I have an app with most of my behavior scripts stored in script-only stacks which are attached as sub-stacks to the main stack. So two questions please:
Are sub-stacks supported (or going to be supported) using Create?
If not, am I right in thinking that all of my behaviors will now need to be stored as button scripts, and if so will this work using the widget button within the Create framework?
Are there any other aspects of Create that will affect how behaviors work?
Thank you for your reply,
I’ve just managed to integrate a substack into a Create project. I didn’t succeed the last time I tried. In fact, the following code :
on preopenstack
start using stack (specialfolderpath("Desktop")&"/testlc.livecodescript")
end preopenstack
It works, but the preopenstack doesn’t seem to be executed either when you open the project or when you click on “run”.
To make it work, the only solution I’ve found is :
Create a second Layout
Open it using the Project Browser
Open the first layout again
In this case, the preopenstack of the Layout 1 script is executed and the reference to the livecodescript is added to the Project Browser!
I don’t know if this is a bug or simply a minor refinement flaw, but it’s disturbing my old “livecoder” reflexes.
As for Behavior, I suppose it’s possible to integrate them via script. I’ve also come across a setting (similar to the one in the classic IDE) in the Property Inspector, but it doesn’t seem to work…
Thanks for the report! @smunos I can confirm this is a bug. I have filed it and we are working towards a resolution. Check back here for an update on when this is fixed!
Thank you for taking the time to help us improve LiveCode Create.
Behaviours haven’t changed and will continue to work the same so you will not need to store your behaviours as button scripts or change how they are set up.
The preopenstack behaviour is a bug though. In future it will be executed as soon as the project is opened and you won’t have to switch between layouts to trigger it.