Page 1 of 1
Is it BAD to use preOpenStack & OpenStack?
Posted: Wed Mar 03, 2021 12:31 am
by DR White
Do bad things happen if stack uses preOpenStack & OpenStack in the current version of LC?
Re: Is it BAD to use preOpenStack & OpenStack?
Posted: Wed Mar 03, 2021 3:46 am
by kdjanz
NO.
In many cases they are essential for getting the stack set up properly, checking preferences or making appearance settings before the main event loop of the stack proper begins to run. You just need to make sure you are doing the right setup in the right place for things to work well. Since the stack is not fully open on preOpenStack, some think cannot happen then. Those actions have to wait for the openStack phase before they can take place. Simplest method is write your script and try it out. If you get errors on a particular action, move that action to later in the process (openStack) and see if they work better there.
Re: Is it BAD to use preOpenStack & OpenStack?
Posted: Wed Mar 03, 2021 8:28 am
by SparkOut
Also recognise the message path and be aware that preOpenStack and openStack messages (also the "card" equivalents and close messages) may be generated in substacks. If not handled there, then they will be passed up to the mainstack script and could cause confusion if you're not expecting it.
Re: Is it BAD to use preOpenStack & OpenStack?
Posted: Wed Mar 03, 2021 10:01 am
by FourthWorld
DR White wrote: ↑Wed Mar 03, 2021 12:31 am
Do bad things happen if stack uses preOpenStack & OpenStack in the current version of LC?
No. What brings that question to mind?
Re: Is it BAD to use preOpenStack & OpenStack?
Posted: Wed Mar 03, 2021 2:09 pm
by DR White
"No. What brings that question to mind?"
preOpenStack & OpenStack used to be in the drop down menu of stack handlers, but for the last few versions it has been removed and replaced with "startup".
Re: Is it BAD to use preOpenStack & OpenStack?
Posted: Wed Mar 03, 2021 2:57 pm
by elanorb
Hi
These messages appear in the handler list for Card Scripts. This is because these messages are initially sent to the first card when the stack is opened so they appear in that list.
There is a bug report about this
https://quality.livecode.com/show_bug.cgi?id=22747
It is currently waiting for an Expert Review but I'll flag it with the team since it has come up here.
Kind regards
Elanor