One of the things I do to prevent re-initialization of a card or stack is I 
create a global, and upon successful initialization I set it to true. I check 
it's value before initializing and only call the initialization handler if the 
global is not set to true. This has the benefit of being able to recall the 
initialization if needed during development without having to quit or 
close.remove from memory the stack. In the message box: 

global stackInit;put false into stackInit;openStack

Bob


On Sep 11, 2011, at 8:22 AM, Gregory Lypny wrote:

> Hi Mark and Jacqueline,
> 
> The substacks had PreOpenStack handlers that called a library stack and 
> sometimes emptied out some fields, but what they did not have OpenStack 
> handlers.  The absence of OpenStack handlers appears to have been the problem 
> because, after the the sub-stack executes its own PreOpenStack, the main 
> stack, for whatever reason, executes its OpenStack.  This, of course, can be 
> disastrous if the main stack is intended to initialize an app or perhaps 
> contains sensitive material that should not be revisited!  My fix is to 
> include an OpenStack handler with nothing in it in every sub-stack in order 
> to trap the message.
> 
> on OpenStack
> — Do nothing
> end OpenStack
> 
> 
> Gregory
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to