More Scope Problems
    David Burgun 
    dburgun at dsl.pipex.com
       
    Tue Jan  3 11:01:19 EST 2006
    
    
  
Hi,
I have a problem that is baffling me. I have number of stacks:
StackA
StackB
StackC
In the preOpenStack hander of Card 1 of StackA, I load some other 
stacks using the:
go invisible stack "StackB"
close stack "StackB"
(The above it just to get the stack loaded and to setup some values 
that are needed by StackA)
Then I do the following:
send "StackInitialize" to this stack
Which should (unless I am wrong) call the "StackInitialize" handler 
in StackA. This happens some of the time, but about 50% of the time 
control is passed to the "StackInitialize" handler in StackB (Both 
stacks have a handler of this name), so I don't get an error. I have 
added a breakpoint statement (since the debugger is flakey and won't 
stop on a normal breakpoint) just before the send "StackInitialize" 
to this stack statement and if I step into the "StackInitialize" 
handler, about 50% of the time control is passed to StackB, not 
StackA. If, before I step into the handler I do:
put the name of this stack
from the Message Box, it says "StackA", yet when I step, it goes to "StackB".
Can anyone shed some light on this and tell me what I am doing wrong?
Thanks a lot, and Happy New Year
Dave
    
    
More information about the use-livecode
mailing list