preopenstack handler interrupt?

Jim Bufalini jim at visitrieve.com
Tue Mar 9 20:32:52 EST 2010


Ron wrote:

> I have a mainstack with a preopenstack and openstack handler in the
> card. In the preopenstack handler there is a call to write out a
> preference stack from a custom property, then open that stack, read
> data from that stack and then continue with other operations.
> 
> My question is, is the preopenstack handler of the main stack
> completed before any preopenstack handlers in the preference stack? or
> does the call to open the preference stack interrupt the main stacks
> preopenstack handler?
> 
> Thanks if you can follow this...

The preOpenStack and openStack of the PREFERENCES stack will complete prior
to the completion of the MAINSTACK. 

This is because you are calling for the opening of the preferences stack
from inside of the preOpenStack handler of the mainstack. As opening a stack
requires the preOpenStack and openStack to run for the stack to be "opened,"
these handlers of the preference stack will run before control is returned
to the preOpenStack of the mainstack to continue running. Otherwise, you
would not be able to open a stack and do something with it (like *start
using*) from within the preOpenStack of another stack.

Aloha from Hawaii,

Jim Bufalini








More information about the use-livecode mailing list