> I wrote the parent script and the behavior below to avoid the MIAW
> crashing problem on Windows. They could solve the problem but I had
> another one. When I tried to open the MIAW twice, the following error
> message was shown and it could not open.
>
> [Error message]
> Unable to open file "XXX.dir" because it is already open with write
> permission by another user.
>
> --[ForgetWindow]
> -- Parent script of the MIAW movie
> property pMyWindow
>
> on new(me, oWindow)
> pMyWindow = oWindow
> tell the stage to timeOut(me.string).new(0, #xNothing, me)
> end
>
> on exitFrame(me, oTimeOut)
> oTimeOut.forget()
> pMyWindow.close()
> pMyWindow.forget()
> end
I had exactly the same problem when using the same technique. I think what's
happening is that the parent script is holding a reference to the window and
there is a circular reference between the timeout object and the script
object, so the script object never gets garbage-collected thus its window
ref is still valid. The way I solved this was to explicitly set the timeout
object's target to zero before forgetting it.
I'll be interested to hear if that works for you.
-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!]