Hi. Check this post from Jakob Hede Madsen:

"Here is a behavior which closes the MIAW it sits in, and properly
disposes of the MIAW, abiding common empirical experience of such
struggles.
Don't worry if you don't quite understand it, try it on anyway.

----<score script: miawCloserButtonBhv>----
--miawCloserButtonBhv

property pWindow

on mouseUp me
  pWindow = the activeWindow
  pWindow.forget()
  sprite(me.spriteNum).scriptInstanceList.deleteOne(me)
  -- The "t" below is crucial, do not delete --
  tell the stage to t = timeOut(me.string).new(1, #mForget ,me)
end

on mForget me, aTimer
  pWindow = VOID -- not required, but just nice and clean.
  aTimer.forget()
end
----</score script: miawCloserButtonBhv>----



Here is another approach, for use with MIAWs with window-close-widgets:

--------<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()
  -- The "t" below is the actual bugFix --
  tell the stage to t = timeOut(me.string).new(0, #dummy , me)
end

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


-- Agustín María Rodríguez | [EMAIL PROTECTED] | www.OnWine.com.ar


[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