Page 1 of 1

regular expressions in actions settings ?

Posted: Tue Dec 11, 2018 11:08 am
by soulbrother
Hi,

The screenshot shows the settings:
I use 3 hotspot templates with an external loader to place logos in panos.

The need is: many logos should be placed in many panoramas, in 3 different sizes.
So, the same logo-jpg is used to be shown in different sizes and panos.

It workes fine, if I do NOT klick the yellow warning icon, and if I do NOT use the hash key in front of the target name in the actions settings.
But if I use the target as regular expression (with the hash tag) it does not work and many logos are wrong or show an "empty" rectangle.

So I wonder and ask, if I can use the following settings with nonregular expressions and if I may ignore the exclamation mark / warning icon, or if that may cause other problems?
screenshot-2.jpg
screenshot-2.jpg (177.67 KiB) Viewed 1518 times

Re: regular expressions in actions settings ?

Posted: Tue Dec 11, 2018 12:58 pm
by Hopki
Hi,
You only need a # if you are addressing a hotspot template or child of a hotspot template or if you have more than one element in the skin with the same ID.
Example if you have a hide action to hide element, Rectangle 1, and you have two in the skin, only the first one in the tree will be hidden.
If you use the target #Rectangle 1 then the action looks deeper and will hide all elements with the ID Rectangle 1.

What is happening here is a Hotspot template is addressing a child of a hotspot template which is causing the warning.
But as it's address its own child element it does not need the #.
I have added a bug report as it should not show the warring.

But I will leave it to the devs.

Also it would be better to use Config Loaded rather than Start, not that makes a difference with the bug but would be better.
With Start maybe not everything is loaded and an action may not work.
Regards,
Hopki

Re: regular expressions in actions settings ?

Posted: Tue Dec 11, 2018 2:01 pm
by soulbrother
Thanks a lot Martin!

So I will use it without the hashtag, fine!

I just try "Config Loaded" instead of "Start" and it does not load the external pics.
When background is enabled I can see the external loaders areas, but no pictures (logos in that case) are shown.
But it still works with "Start".

I am thankful for any more hints and explanations, if there might be some ;-)

Best regards,
Dieter

Re: regular expressions in actions settings ?

Posted: Tue Dec 11, 2018 5:14 pm
by Hopki
Hi Dieter,
Interesting, stick with start for now with no #.
Talking with one of the developers we will remove the warning if targeting a child element of a template.

It does depend if the action is in an element in the skin or a hotspot template.
As an example if you had a rectangle in the skin then you would use: Config Loaded, as Start would not work.

But the Hotspot Template being a special element, the Config Loaded source does not seem to work!
So it requites a Start source action.

Anyway once the warning triangle is removed all should work as should, just ignore when I said about using the source action Config Loaded.
But you would use this for other skin elements.
Regards,
Hopki