> I'm pretty sure someone has a more classic 
> "looping flagWatcher" approach handy.

I also found the "looping flag-watcher" approach a bit plain-vanilla and
tried a little experiment prompted by (if memory serves) Jakob's telling a
list that each window maintains it's own actorList (as well as it's own
timeOutList). I include a parent script in the MIAW's cast that will accept
a window handle for later closure, and then add this object to the _stage's_
actorList. There are no other pointers to this object retained, so after
it's next stepFrame message - where it closes/forgets the window handle it
was passed - it deletes itself from the (stage's) actorList.

Pretty much the same as Jakob's technique but without the use of timeOut
objects.

It has worked for me, but I'd like to know what others think - is it OK to
have an object remove the last/only pointer to itself? Is an object really
gone (ie. is the RAM space it occupied really freed up) if the last pointer
to the object is voided?

Also, this approach works for D7.

Cheers,
Sean.

-- MIAW closer parent --
property pWindow

on new me, aWindow
  pWindow = aWindow
  tell the stage to (the actorList).add(me)
  return me  -- optional??
end

on stepFrame me
  -- error checking goes here
  close pWindow
  forget pWindow
  (the actorList).deleteOne(me)
end

[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