The Long Name peculiarities

Peter Haworth pete at
Mon Jun 18 18:32:29 EDT 2012

I've come across what I think is a bug in what is returned as the long name
of a control.  It only happens in fairly obscure circumstances.

Here's the recipe (LC 5.5).

Button script:

on mouseUp
  create graphic
  create graphic
end mouseUp

Group the two graphics together and give the group a specific name, eg
"Groupa", instead of it's default name

Give one of the two graphics a specific name, eg "grc1", instead of its
default name

Select the named graphic and in the message box, do "put the long name of
selobj()"  You will get:

graphic "grc1" of group "GroupA" of ….

Now select the other, unnamed graphic and repeat the message box command.
 You will get

graphic id 123 of group 456 of……

In other words, if a control is unnamed, the long name returns the ids of
it's owner(s), not their names.

Some of my scripts are failing because of this because I am looking for
certain group names in a control's long name

To me, this is a bug but I've been corrected before on what I believe to be
bugs so what do you think?

More information about the Use-livecode mailing list