preOpenStack - Main stack script affects SubStack when it opens?

Peter Haworth pete at mollysrevenge.com
Tue Dec 7 21:41:51 EST 2010


I think I've run into that and got round it by checking the name of  
"this stack" in the preOpenStack handler and only executing the rest  
of the script if I'm in the mainstack.  Actually, come to think about  
it, that was in a preOpenCard handler for a card in the main stack,  
not the main stack itself but I'm sure the same technique will work.

Pete Haworth

On Dec 7, 2010, at 6:19 PM, Glen Bojsza wrote:

> Maybe it's me or should this not be happening. Livecode 4.5.1.
>
> I have a mainstack that has a preOpenStack that does some house  
> keeping...
>
> I just added a substack that is opened from the mainstack by a user  
> clicking
> a button.
>
> **There is NO preOpenStack in the substack
>
> When the substack opens the preOpenStack of the mainstack tries to  
> run which
> generates an error since none of the objects on the mainstack are on  
> the
> substack.
>
> Should preOpenStack only work with the stack that contains it?
>
> If this is the proper way the system works then what is the work  
> around?
>
> thanks,
>
> Glen
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>





More information about the Use-livecode mailing list