long FieldName to owning stackName

William Marriott wjm at wjm.org
Tue Aug 25 05:51:13 EDT 2009


Well, it will always reference the mainstack of the control; by 
definition, substacks aren't separate files, so the *file* name will 
always be correct. Yes?

The issue with using "owner" is that technically you would have to 
recurse through an indeterminate number of owner levels, for groups 
nested within groups.

If you need the name of the substack, then you probably can't get away 
with a one-liner

put the long name of control n into x
put word 1 to 2 of (char offset(" stack" && quote,x) to -1 of x)

It really depends on what you specifically need and the usage, but in 
any event, I don't consider using chunk expressions to be a "hack" in 
this case.


Mark Schonewille wrote:
> Not, because that might give you the wrong stack file.
> 
> On 25 aug 2009, at 11:27, William Marriott wrote:
> 
>> why not:
>>
>> the last word of the long name of control x




More information about the Use-livecode mailing list