The Long Name peculiarities

Peter Haworth pete at lcsql.com
Mon Jun 18 20:23:23 EDT 2012


I can see why this happens with the control itself but not for the owners
of the control that do have names defined.

Pete
lcSQL Software <http://www.lcsql.com>



On Mon, Jun 18, 2012 at 4:08 PM, Mike Bonner <bonnmike at gmail.com> wrote:

> Yep, do the same with buttons.
>
> create button
> create button
>
>
> you get two buttons with no text, IE no name. Do something that forces the
> name to be set and viola'.
>
> if you create button then put the name of the last button, same deal. It
> puts the id because apparently the name is not set. This also explains why
> the name in the inspector shows the id of the object.  No name, engine does
> the best it can and shoves the id of the object into the name field.
>
> So i guess the answer is always name your objects after create.
>
> On Mon, Jun 18, 2012 at 5:01 PM, Mike Bonner <bonnmike at gmail.com> wrote:
>
> > If you go into the inspector after creating the 2 grcs the name is set to
> > the id. I think this is a behavior that occurs when there is no valid
> name
> > set for the grc, but the name of the grc isn't actually whats shown in
> the
> > inspector. If you click in the box, don't change the name, click out of
> the
> > box, things start to work. (and it would make sense.  No name available,
> so
> > it defaults to showing the id of things instead)
> >
> > Still think its a bug though, shouldn't there be a valid default name
> that
> > is set when using 'create grc' ?
> >
> >
> > On Mon, Jun 18, 2012 at 4:46 PM, Bob Sneidar <bobs at twft.com> wrote:
> >
> >> Wow! Nice catch! If not a bug, it's certainly an "anomaly".
> >>
> >> Bob
> >>
> >>
> >> On Jun 18, 2012, at 3:32 PM, Peter Haworth wrote:
> >>
> >> > 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?
> >> > _______________________________________________
> >> > use-livecode mailing list
> >> > use-livecode at lists.runrev.com
> >> > Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >>
> >> _______________________________________________
> >> use-livecode mailing list
> >> use-livecode at lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >
> >
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list