Hi Karina

>
> Would it also be unstable if you use  "tell the stage" in the window, to
> call a handler in the stage's movie script, that closes that window?
>
> Karina

The main reason that having a window set a "flag" in the movie running on
the stage is to prevent the inability for the MIAW code to handle the call
back.

Example:

MIAW -> Tell the stage to close the MIAW
Stage -> Forget MIAW
Stage -> Okay MIAW I've finished executing the handler to forget the MIAW
Director -> can't find MIAW -> Error can't return control to the MIAW

In other words, if you run the debugger and begin stepping the code just
prior to telling the stage to close the MIAW you will notice that you are in
a handler within the MIAW, you then jump out to the stage to run the handler
that will close the MIAW. When that handler completes, it jumps back to the
MIAW but the MIAW no longer exists and it "may" attempt to run the instance
of the handler at memory address xyz but that address has been purged and
now only contains "junk".. causing Director to throw up its arms and die.

However, if you use a flag, the call in to the stage allows you to return to
the MIAW after completion of setting the flag.. the MIAW code finishes
executing and the next events in the stage occur.. ie. idle, prepareFrame,
exitFrame etc... and the MIAW can be closed without causing errors.

Does that make any sense at all.

Sincerely

Mark R. Jonkman


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to