Simple Scoping Question

David Burgun dburgun at dsl.pipex.com
Wed Apr 20 14:32:15 EDT 2005


Hi,

Thanks a lot for this. No, I don't have any substacks so moving it 
into the card script sounds best. Ok a couple of questions of this. 
You say move it to the "first card", well in this stack there is only 
one card so the issue doesn't come out, but for the sake of knowing, 
if I have more than one card in the stack, do you mean the card that 
is currently the "first" card, or the first card created by the IDE?

Sorry if I sound dense, but I have been mucking about with this for 
ages and I just wanna get it right!

Thanks for the help
Dave

>Recently, David Burgun  wrote:
>
>>  I hadn't realized that the openStack handler gets called when doing a
>>  Save. What is the recommended action for handle this?
>>
>>  I could do one of three things:
>>
>>  1.  Check if myStackFileName is empty and if so skip the "start uisng"
>>  2.  Check the Stack Name for "revSaving" and if so skip the "start uisng"
>>  3.  Check if in "development" moce and if so  skip the "start uisng"
>>
>>  I suppose I need similar tests in preOpenStack and closeStack?
>>
>>  Can anyone tell me the best thing to do under this condition?
>
>If your openStack handler is only supposed to apply to your main stack, then
>place the openStack handler in the script of the *first card* of your main
>stack (this goes for any initialization handlers since they are only called
>when the first card is opened).  Any subsequent opening/closing of stacks
>will not trigger the init handler/s.
>
>If your openStack handler must apply to any substacks of your main stack,
>you can do as you suggest above: check the stack's name, for development
>mode, etc.
>
>Regards,
>
>Scott Rossi
>Creative Director
>Tactile Media, Multimedia & Design
>-----
>E: scott at tactilemedia.com
>W: http://www.tactilemedia.com
>
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list