Startup message

Graham Samuel livfoss at mac.com
Tue Aug 2 18:18:47 EDT 2011


Startup will do what you want. To test while in the IDE, do

send "startup" to stack "mymainstack"

from the message box.

HTH

Graham

On :Tue, 2 Aug 2011 13:57:14 -0700, Pete <pete at mollysrevenge.com wrote:
> 
> 
> Thanks Richard.  If I understand the message path correctly, the
> preOpenStack handler in the mainstack will be executed for every substack of
> the main stack that is opened?  I can easily check whether my initialisation
> code has already executed in the handler but was hoping for a way to have
> the code executed just once when the app started up.
> Pete
> Molly's Revenge <http://www.mollysrevenge.com>
> 
> 
> 
> 
> On Tue, Aug 2, 2011 at 1:29 PM, Richard Gaskin
> <ambassador at fourthworld.com>wrote:
> 
>> Pete wrote:
>> 
>>> Thanks folks, didn't realise this message only applied to standalones.  Is
>>> there then no equivalent for stacks running in the IDE, other than a
>>> preOpenCard/preOpenStack handler?
>>> 
>> 
>> Startup is for when the engine starts up, preOpenStack is for when a stack
>> is opened.  Having both messages is very useful.  Using preOpenStack for
>> things you want to initialize in both the IDE and as a standalone will do
>> what you need.
>> 
>> --
>> Richard Gaskin
>> Fourth World



More information about the Use-livecode mailing list