Is it BAD to use preOpenStack & OpenStack?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
DR White
Posts: 686
Joined: Fri Aug 23, 2013 12:29 pm
Location: Virginia, USA

Is it BAD to use preOpenStack & OpenStack?

Post by DR White » Wed Mar 03, 2021 12:31 am

Do bad things happen if stack uses preOpenStack & OpenStack in the current version of LC?

kdjanz
Posts: 300
Joined: Fri Dec 09, 2011 12:12 pm
Location: Fort Saskatchewan, AB Canada

Re: Is it BAD to use preOpenStack & OpenStack?

Post by kdjanz » Wed Mar 03, 2021 3:46 am

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.

SparkOut
Posts: 2854
Joined: Sun Sep 23, 2007 4:58 pm

Re: Is it BAD to use preOpenStack & OpenStack?

Post by SparkOut » Wed Mar 03, 2021 8:28 am

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.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9846
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Is it BAD to use preOpenStack & OpenStack?

Post by FourthWorld » Wed Mar 03, 2021 10:01 am

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?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

DR White
Posts: 686
Joined: Fri Aug 23, 2013 12:29 pm
Location: Virginia, USA

Re: Is it BAD to use preOpenStack & OpenStack?

Post by DR White » Wed Mar 03, 2021 2:09 pm

"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".

elanorb
Livecode Staff Member
Livecode Staff Member
Posts: 516
Joined: Fri Feb 24, 2006 9:45 am

Re: Is it BAD to use preOpenStack & OpenStack?

Post by elanorb » Wed Mar 03, 2021 2:57 pm

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
Elanor Buchanan
Software Developer
LiveCode

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”