Tabs

Richard Gaskin ambassador at fourthworld.com
Sun Jan 2 22:04:14 EST 2005


Alex Tweedly wrote:
> Richard Gaskin wrote:
> 
>>    Simple. Easy. Quick. Automatically accomodates any number of tabs. 
>> What else could a body ask for?
>>
>> Just one more line:
>>
>> on menuPick ChosenOne
>>   lock screen <- to postpone redraw until the changes are completed
>>   repeat for each line LL of me
>>     set the visible of group LL to (LL = ChosenOne)
>>   end repeat
>> end menuPick
>>
>> That's how I do it in WebMerge.  There are about 200 controls spread 
>> across four groups, and I found it easier to address them all on one 
>> card rather than having to specify the card for each control in the 
>> scripts that deal with them.
> 
> 
> Are there advantages of this approach compared to Dave C's suggestion of
> 
>> on menuPick pNew, pOld
>>   hide group pOld
>>   show group pNew
>> end menuPick 
> 
> 
> Now that I realize that there is a second parameter provided, it seems 
> like the better way - but are there any cases where the "pOld" wouldn't 
> be what might be expected ?

I don't think it makes much difference, but the former may be a better 
example of "defensive programming" as it accounts for the possibility 
that some other script (or even the developer during editing) may leave 
a group visible that isn't the same as pOld.

--
  Richard Gaskin
  Fourth World Media Corporation
  __________________________________________________
  Rev tools and more: http://www.fourthworld.com/rev



More information about the use-livecode mailing list