Function to break apart a Long Name?

Jeanne A. E. DeVoto revolution at jaedworks.com
Mon Oct 17 17:07:09 EDT 2005


At 4:00 PM +0100 10/17/2005, David Burgun wrote:
>Does anyone know of a function that will extract name of the 
>Control, Group, Card and Stack from a long name string?
>
>e.g. I have a string of the form:
>
>control "A" of group "B" of card "C" of stack "D"
>
>And I would like to have:
>
>local myControlName  = A
>local myGroupName = B
>local myCardName = C
>local myStackName = D

I'd use the short name in conjunction with the owner for this:

   -- "myControl" is control "A" of group "B" of card "C" of stack "D"
   put the short name of myControl into myControlName
   put the short name of the owner of myControl into myGroupName
   put the short name of the owner of the owner of myControl into myCardName
   put the short name of the owner of the owner of the owner of 
myControl into myStackName
-- 
jeanne a. e. devoto ~ revolution at jaedworks.com
http://www.jaedworks.com



More information about the use-livecode mailing list