On Thu, Sep 27, 2012 at 4:56 PM, Scott Rossi <sc...@tactilemedia.com> wrote:
> IMO, I don't think it's a good idea to name things using "id xyz" since > that's a specific way to refer to objects. In theory you could name a > card "card id 4001" while its id is 1004, but that seems like a recipe for > confusion. Just like it's not a good idea to name a control using only a > number because it's possible for scripts to get confused, i.e. button "7". > I'd definitely agree with that, which it all the more strange that the IDE does it. > In any event, watch what happens if you delete the name of an object that > was previously named -- it shows up in the inspector as "button id 1004" > or similar. The card referencing behavior is consistent with objects: if > a control has no name, refer to it by its id. > Interesting. I've never deleted the name of a control (at least knowingly) so have never seen that behavior. It's not quite the same as cards since newly created controls do get a real name assigned to them like "button" or "field". Despite the consistency aspect, I still think it's strange behavior. No problem referring to a card by it's ID when it has no name - the trick is how to figure out that it has no name since there is nothing to stop someone naming a card in a way that makes it look like the default-but-non-existent name. I just switched over to using card IDs instead of names. This is in my lcStackBrowser plugin so I have no control over how someone names their objects. > > Regards, > > Scott Rossi > Creative Director > Tactile Media, UX Design > > > > > On 9/27/12 4:45 PM, "Peter Haworth" <p...@lcsql.com> wrote: > > >Yes, that's my conclusion too. As you say, it's easy to find another way > >to refer to the card. It's just very puzzling why the IDE wouldn't just > >set the name property to "card ID 1002" when the card is created instead > >of > >showing incorrect information in the App Browser. > >Pete > >lcSQL Software <http://www.lcsql.com> > > > > > > > >On Thu, Sep 27, 2012 at 3:34 PM, Scott Rossi <sc...@tactilemedia.com> > >wrote: > > > >> I think the name is shown for reference, in lieu of an assigned name. > >> You need to refer to the card like you do an object: > >> > >> put the ID of card ID 1002 of stack "xyz" > >> > >> Regards, > >> > >> Scott Rossi > >> Creative Director > >> Tactile Media, UX Design > >> > >> > >> > >> > >> On 9/27/12 3:25 PM, "Peter Haworth" <p...@lcsql.com> wrote: > >> > >> >It would appear that a card shown in the App Browser with a name like > >> >"card > >> >id 1002" (in other words, the default name when the card was created) > >> >doesn't really have that name, or maybe any name at all. > >> > > >> >I get a runtime error when I try to refer to a card like that by name, > >> >e.g. > >> >card "card id 1002" of stack "xyz" and in the message box: > >> > > >> >put the ID of card "card ID 1002" of stack "xyz" > >> > > >> >... returns an error "can't find card", even though I can see it in the > >> >App > >> >Browser > >> > > >> >If I rename the card, everything works OK. > >> > > >> >This seems like pretty strange behavior so wondering if anyone else > >>sees > >> >it. > >> > > >> >LC 5.5.0, OSX 10.7.4 > >> > > >> >Pete > >> >lcSQL Software <http://www.lcsql.com> > >> >_______________________________________________ > >> >use-livecode mailing list > >> >use-livecode@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@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@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode