Looping over all buttons

Bob Sneidar bobs at twft.com
Wed Feb 22 12:51:38 EST 2012


I am constantly doing do! Don't you?

Bob


On Feb 22, 2012, at 9:41 AM, J. Landman Gay wrote:

> On 2/22/12 11:12 AM, Bob Sneidar wrote:
>> not for.
>> 
>> repeat with x = 1 to the number of buttons of this card
>>   do "put the hilite of button x into button"&  x
>>   -- a better way
>>   put the short name of button x into ButtonHilitesA[x]["name"]
>>   put the hilite of button x into ButtonHilitesA[x]["state"]
>> end repeat
>> 
>> Now you have a numbered array of button names and states.
> 
> I wouldn't use "do". Every time it runs, the whole compiler has to load.
> 
> Unduly doing do is doo doo.
> 
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.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