Determining stack of object nested in groups
Trevor DeVore
lists at mangomultimedia.com
Sat Aug 28 19:12:41 EDT 2004
On Aug 28, 2004, at 3:54 PM, Richard Gaskin wrote:
> Trevor DeVore wrote:
>
>> I can think of two ways to get the stack an object belongs to based
>> on the long id of the object:
>> 1) Parse the string and extract the "stack myStack" part.
>> 2) loop that keeps getting the owner until the owner is a stack.
>> I couldn't find a built in property for this. Is there one or is
>> option 1 the best way to do this?
>
> I think so, perhaps something like:
>
> if ("stack ""e&"MyStack""e) is in \
> the long name of the target then....
Good to know. I just put together a regular expression to extract an
unknown stack:
get matchText(long id of myObject, "(stack ""e&".*""e&")$",
tTargeStack)
This will put:
stack "Owner stack name"
into tTargetStack.
--
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com
More information about the use-livecode
mailing list