Best Practice: Prevent Substacks from Triggering Main Stack Scripts

Brahmanathaswami brahma at hindu.org
Fri Feb 6 20:47:31 EST 2015



Richard Gaskin wrote:

1) If the mainstack is a single card, just put the handler in the card 
script.

2) If the mainstack has multiple cards, put the handler in a common 
group script.

3) If neither of those are viable in your setup, you could add a check 
to make sure the long name of "me" is in the long ID of the target.


BR:  Understood. I doing # 2 now... so I guess that will do for now.



>> How do you do this in real code
>>
>> on resizestack x,y
>>   if this stack is not the stack that this handler resides in then
>>     do nothing
>> else
>>    set the rect of some grc to the rect of this card
>> # and other tricks here  relating to dynamic geometry changes...
>>    end if
>> end resizestack
>
>




More information about the use-livecode mailing list