Delete a stack from memory - fails?

David Bovill david at openpartnership.net
Wed Jul 30 09:52:14 EDT 2008


2008/7/29 Trevor DeVore <lists at mangomultimedia.com>

>
> So what is a plugin developer to do? If using the short name of the stack
> in your object refs and the object no longer exists then you have to
> determine if:
>
> a) The object was deleted.
> b) The stack name was changed (with msgs locked) but the object ref is
> otherwise valid.
> c) The stack name was changed (with msgs locked) and the object was
> deleted.
>
> Very tricky. I think the IDE engine could use a mechanism whereby a plugin
> could register for a message that was received  regardless of whether or not
> messages are locked.


I guess - I have a lot of "plugins" that track objects and code. You are
referring to using the "namechanged" message?  I guess lockmessages also
blocks front scripts....

My main wish for creating such indexing schemes is for an easier to obtain
long "mobile" reference to a control. One which returns the short name of
the stack, in the long name. These references are far more usefull than
"long names" as they work wherever they are called and regardless of where
the files are stored on disk. If you then maintain the stackfiles you have a
good basis for indexing.

Other example are obtaining the stack name of the target or the card name of
the target. I do this all the time for what I call "mobile objects" -
controls that can be moved from stack to stack, and can still be referenced
even if the file / folder has been moved - . all this converting long stack
and substack references to short ones is quite a chunk of code.



More information about the use-livecode mailing list