Post
by trevix » Tue Oct 04, 2022 4:22 pm
Hi.
The switch was a left over of my testing, when I checked, just in case, various folders for Android and iOS and desktop. It doesn't matter.
I assign the behaviour to buttons on development, using the property inspector (Behavior/Create behaviour script only stack/Create stack with empty script).
It does not make sense for me to re-do the assignment on standalone launch, since I will have hundred of controls with behaviour...
With behaviour buttons, you link them and that's it.
Somehow, when opening the main stack, even on development, the property inspector (stack "ButtonNext Behavior") loses its reference, even if the behaviour stacks are loaded in memory.
To recap (desktop):
- the "ButtonNext Behavior.livecodescript" file and the "PrevPrev Behavior.livecodescript" file are both inside a folder "Beh_scripts", at the same level of the main stack.
- my buttons, on the main stack, in their property inspector have the correct name of the behaviour stack.
- I open the 2 behaviour stacks on PreopenStack of the main stack (just getting the name doesn't work either)
- at this point the 2 behaviour stacks are listend in the Openstacks (so should be in memory)
- the behaviours don't work. Will work only if restablishing the behaviour on the property inspector, but will not work again on the next launch.
- the behaviours work only if the behaviour stacks files are out of a folder, at the same level as the main stack (same on mobile).
Since behaviour using behaviour buttons works fine, always, why it does not work using script stacks? Do I need to set the stack ID on the property inspector?
What am I missing?
See the attached example stack (it was created to study the "open substack in window", which, by the way, works fine for closing the substacks behind, when going to a new one...).
-
Attachments
-
- OpenCardTests.zip
- (104.42 KiB) Downloaded 57 times
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>