> okay disregard my previous message-
> the error occurred once i started to try to "break " it
> what now?
>
> > the miaws are referenced to a movie script-
> > there is a button in the MIAW to close it- it calls a handler -
> > handler basically checks the windowlist- closes the window, forgets the
> > window, and deletes the window in the windowlist

It's amazing how often this comes up! Where is the script that closes &
forgets the window? Is it in the window itself, or is it in the stage's
cast?

If it's in the window then there's your problem already - you can't have a
window forget() itself. If it's in the stage, then your still not in the
clear - if some handler in the window is asking the stage script to forget
the window then that is where your problem is. The originating call cannot
come from anywhere in the window or it will crash - periodically.

Here is a couple of scripts that are tested and work - courtesy of Jakob
Hede Madsen:

--------<movie script>--------
on closeWindow
   script("miawCloserClass").new(the activeWindow)
end
--------</movie script>--------

--------<parent script "miawCloserClass">--------
--miawCloserClass

property pWindow

on new me, aWindow
   pWindow = aWindow
   pWindow.forget()
   tell the stage to t = timeOut(me.string).new(0, #dummy , me)
end

on exitFrame me, aTimer
   aTimer.forget()
end
--------</parent script "miawCloserClass">--------

Put the parent script into your MIAW's cast and instantiate it when needed,
not necessarily from the 'closeWindow' handler as in the <movie script>.

HTH,
-Sean.


[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