Bug getting group name, plse check

Richard Gaskin ambassador at fourthworld.com
Fri Aug 14 20:28:56 EDT 2015


William Prothero wrote:

 > “the long name of me” is a complete reference to an object, which
 > contains the group name. What I was trying to do is get the name of
 > the group that the button is in. I can parse it from the long name of
 > me, but thought it would pull it out of “me”.
 >
 > Anyway, what do I know? If I’m wrong to expect this, then I won’t
 > report it as a bug (of course).

LiveCode does so many things for us so well that it's easy to 
overestimate its intelligence.

When you write:

    put the short name of grp me into tGroup

...what it sees is:

    put the short name of grp (me) into tGroup

...which becomes evaluated as:

    put the short name of grp (button id 1033 of group id 1035 of card 
id 1011 of stack "Some/Path/To/Stackfile.livecode") into tGroup

..which causes the engine to have a minor breakdown trying to figure 
that out. :)

It would be nice if we could write:

    put the short name of my grp into tGroup

While we don't currently have "my <parentType>" (however cool that might 
be) we do have a more generic form, the owner:

    put the short name of the owner of me into tGroup

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list