The Long Name peculiarities

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


Thanks Mike, interesting what happens if you just click in and out of the
name box.  Unfortunately, I don't have control over the objects that cause
this behavior - they are part of the datagrid structure.

I think I will report it as a bug.  Kind of a pain to work around it
though.  I think I will have to have a repeat loop that gets the name of
the owner, then the owner of the owner, etc, until I get to a group that is
a datagrid or the card.  Easy enough to script, just a hassle to have to do
it for this special case.

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



On Mon, Jun 18, 2012 at 4: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