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.