ResumeStack message... bug?

J. Landman Gay jacque at
Mon Nov 12 23:00:44 EST 2007

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. Try locking messages 
before issuing the "go" command to see if that helps.

Jacqueline Landman Gay         |     jacque at
HyperActive Software           |

More information about the Use-livecode mailing list