I haven't seen the whole conversation, but generally whenever Director is
operating in the context of the MIAW itself, you cannot issue a "close
window" command for the MIAW.
This means, regardless of whether you have an object, or a handler, or
whatever, in the MIAW running, you cannot close that window safely. The
only safe way for the MIAW to "close itself" is to set a FLAG, and for the
Director movie to repeatedly check for this flag.
Generally I do something like this:
(in the main .dir movie, monitoring for a close event)
on idle
global gWindowToKill
if (not voidP(gWindowToKill)) then
close gWindowToKill
gWindowToKill =VOID
end if
end
And in the MIAW:
on mouseDown -- or whatever the event
-- Mark us for destruction
global gWindowToKill
gWindowToKill =the activeWindow
end
This code is from memory (meaning, mine) but it's something appropriate to
what I use. The key part is that the MIAW does NOT issue its own
destruction NOR DOES IT call the player directly for its own
destruction. In both cases, the root context is the MIAW. The reason it
works is because it sets a FLAG for later. Later, when operating in the
context of the root movie, then we kill the window and everything is kosher.
- Tab
[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!]