living and learning (Re: RunRev vs RealBasic (Richard Gaskin))

Dan Shafer revdan at danshafer.com
Wed Jan 19 16:20:30 EST 2005


On Jan 19, 2005, at 12:34 PM, Richard Gaskin wrote:

> What got me started using groups instead of cards was referencing 
> objects in scripts:  While designing WebMerge 2.0 I kept moving 
> controls from one tab to another until I got myself clear on what the 
> program's flow should be.  During those changes I'd have to change 
> every script reference to every object to include the different card 
> name.
>
> With groups I have all 180+ controls on one card, so I can say:
>
>    get the hilite of btn "idxTemplateOption"
>
> ...and it doesn't matter to the code which group that's part of.
Unless (as is the case in one of my apps), you have multiple groups 
with controls that have the same name. This facilitates making the code 
more generic/abstract and allowing me to place scripts at a higher 
level, but has the downside that I have to track the current group and 
do things like:

get the hilite of btn "idxTemplateOption" of group curGroup

WHen you forget to to that, stuff breaks in ways that are all but 
invisible.

Dan



More information about the use-livecode mailing list