> > The psymState flag I use to flag the object as being dead so I can
> > short circuit it's handlers if I need to until it's actually deleted (a
"state
> > engine" approach).
>
> It's still your sprite that's deleting itself from the
> scriptInstanceList, right? But what actually happens to the
> instance once it's removed itself - does it get cleaned up
> entirely from RAM, or does it continue "floating around" like a ghost?
No, floating around in RAM would be bad. The instance is removed from RAM
when there are no references to it. The flag is merely used in the brief
interval between the time an object adds itself to the garbage collection
and garbage collection actually deletes it. If a handler gets called in the
interim I can do something like:
on mDoSomething me
if psymSTate = #dead then
return
end if
-- do stuff
end
> So what you're saying is, that you can have a behavior delet
> itself from the scriptInstanceList as long as the handler is
> called from outside? I suppose mouse events would be the
> same, since on mouseDown/up/etc. you still cycle through the
> list of that particular sprite.
Exactly, be careful when messing with the list when the primary event
handler is originating from it.
[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!]