ResumeStack message... bug?

Mark Swindell mdswindell at cruzio.com
Mon Nov 12 23:34:14 EST 2007


On Nov 12, 2007, at 8:00 PM, J. Landman Gay wrote:

> Mark Swindell wrote:
>
>> At the stack level of each of the sub stacks place this script:
>> on resumeStack
>> go stack "AAA"
>> put "hello"&return after field 1   end resumeStack
>> Now, toggle back and forth, slowly, between the two substack  
>> windows so that each alternately comes to the front.
>> What I experience (and another list member confirmed) is this:
>> On the first two toggles a  resumestack message is sent and  
>> "hello" appears in field 1 of stack "AAA".
>> On the next two toggles a resumeStack message appears NOT to be  
>> sent and no "hello" appears.
>> Then two more "hellos"
>> Then two "no hellos."
>
> I can't quite work out the repercussions entirely, but I think the  
> problem may be due to nested resumeStack messages. The script is  
> opening another stack during its own resumeStack handler, which  
> will trigger the same message in the newly-opened stack. Since that  
> one also has a resumeStack handler with a "go" in it, I think you  
> are getting some kind of recursion as the two bounce back and forth.


Thank you for the suggestion.

There is no go command in the stack that is being visited, only in  
the two substacks that call the visit to the third (the main  
stack).     But yes, it seems there could be some kind of recursion.   
I just don't know why or where, or why it only happens alternately,  
and then functions as it should.

> Try locking messages before issuing the "go" command to see if that  
> helps.

  Unfortunately lock messages has no effect.  ????





More information about the use-livecode mailing list