Best Practice: Prevent Substacks from Triggering Main Stack Scripts

Bob Sneidar bobsneidar at iotecdigital.com
Fri Feb 6 14:29:46 EST 2015


Put the handlers in the card script of the main stack. When opening the mainStack the card will receive the messages, but not when the substacks are opened. The card of the mainStack is not in the message path of the substacks. 

Alternately, you can put the same handlers in the substacks stack script and not pass them. 

Bob S


> On Feb 5, 2015, at 22:49 , Brahmanathaswami <brahma at hindu.org> wrote:
> 
> If you put any preopenstack, resizestack, close stack etc. script in the mainstack script.. these will be triggered by the same action in a substack.
> 
> What is the best way to avoid this?
> 
> I just moved all those to the main background group of the main stack, but I'm not happy with that architecture. I'm so
> use to running most script in the main stack script for simplicity sake and ease of finding things.
> 
> I suppose one can install "dummy" handlers in the substacks to match.
> 
> e.g
> on preopenstack
> end preopenstack
> 
> and since you are not passing anything, I suspect it will prevent triggering that handler in the main stack..
> 
> But, what are you veterans doing to handle this?
> 
> Swasti Astu, Be Well!
> Brahmanathaswami
> 
> Kauai's Hindu Monastery
> www.HimalayanAcademy.com
> 
> 
> _______________________________________________
> 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