AW: style of addressing objects

Tiemo Hollmann TB toolbook at kestner.de
Wed Feb 9 06:53:23 EST 2011


Thanks Klaus,
thats how I coded already, but it is good to get a commitment by such a
honoured man!
Actually I was thinking of compressing, extracting and copying all objects
first with DITTO - good you mentioned it
Thanky
Tiemo

> -----Ursprüngliche Nachricht-----
> Von: use-livecode-bounces at lists.runrev.com [mailto:use-livecode-
> bounces at lists.runrev.com] Im Auftrag von Klaus on-rev
> Gesendet: Mittwoch, 9. Februar 2011 12:14
> An: How to use LiveCode
> Betreff: Re: style of addressing objects
> 
> Hi Tiemo,
> 
> > Hello,
> >
> > lets say I have a field "f1", grouped in grp "g1" on card "c1".
> >
> > I can address the field e.g.: put "foo" into fld f1
> > But I could also address: put "foo" into fld f1 of grp g1
> > Or: put "foo" into fld f1 of cd c1
> > Or: put "foo" into fld f1 of grp g1 of cd c1 of stack s1
> > And actually every object name with or without quotes
> 
> You should always use QUOTES around NAMES!
> Always! Toujours! Sempre! Siempre! Altijd! Immer! :-)
> 
> 1. This is faster, since the engine does not need to check if there is a
> variable with that name!
> 2. If there IS a variable with that name, that will probably throw an
error.
> 
> > What is "the correct way" of addressing, or what is a good style or what
> > shouldn't you do never.
> > What do the old revolutionaries say? Just curious to get more "standard
> > compliant"
> 
> There is no "correct way" but just a "it depends" :-D
> 
> You can leave the "... of cd "xyz" if the objct you are addressing IS in
fact
> on the current card
> You can leave the "... of grp "xyz" if there is only ONE field with that
name
> on the current card.
> 
> > Thanks
> >
> > Tiemo
> 
> Best
> 
> Klaus
> 
> 
> P.S.
> And DITTO! :-D
> 
> --
> Klaus Major
> http://www.major-k.de
> klaus at major.on-rev.com
> 
> 
> _______________________________________________
> 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