At 13:59 +0530 07/30/2002, Mayuresh wrote:

>on mouseUp me
>--for the close button on your MIAW
>tell the stage
>  closeMiaw()
>end tell
>end
>
>Then in the closeMiaw handler which is on your stage, have the code 
>to close and forget your Miaw.

No no no. Sending the call like that will result in serious and 
painful death on some but not all Windows systems. Here's the only 
clean way I've managed it.

1. Stage has a sprite that's got a window manager behavior. On 
beingsprite this inits the window. On endsprite it forgets it.

2. Window has the close button that sends a call to the stage's 
window behavior, telling it to set a close flag to true.

3. On the next frame cycle the stage's behavior checks its flag, sees 
it's marked true, and forgets the window.

Because Lingo exits one handler temporarily to run another, and then 
returns to the jump-out point when the second handler is finished, a 
tell the stage call issuing a close window command has the same 
effect as disposing the window directly within itself, which means 
(on Win anyway) your program terminates abnormally.

>Another way would be to use your projector exit handler to go 
>through the 'windowlist' and forget all instances of any MIAW's.

I don't believe the windowList has ever been 100 percent accurate, so 
that method might not work either. The best method is to always know 
what windows are open, and which ones you are closing.

-- 

              Warren Ockrassa | http://www.nightwares.com/
  Director help | Free files | Sample chapters | Freelance | Consulting
        Author | Director 8.5 Shockwave Studio: A Beginner's Guide
                    Published by Osborne/McGraw-Hill
         http://shop.osborne.com/cgi-bin/osborne/0072195622.html
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/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