Help for a non-code newbie!
David Vaughan
dvk at dvkconsult.com.au
Mon Jul 21 23:04:00 EDT 2003
On Tuesday, Jul 22, 2003, at 10:03 Australia/Sydney, Sarah
<sarahr at genesearch.com.au> wrote:
>
> Hi Lars,
>
> Other people have suggested various loops
...and here is another one but this one is a general solution rather
than specific to one project. I include this in stacks fairly routinely.
on hideFields
put the paramCount into k
repeat with x = 1 to k
hide field x
end repeat
end hideFields
Put that in your stack script and wherever you want to hide fields,
make a call
hideFields 1,7,3,8 -- (etc)
Notice you can pass it any number of fields and do not first have to
put them in sequence or groups or anything else.
Create a corresponding handler for showing fields, and you might also
want a reversing one, whose main line in the repeat loop is:
set the visible of field x to (not the visible of field x)
You can also pass it field numbers or names, although if you are using
names you should make sure they are not also variables or reserved
words.
regards
David
>
>
> Cheers,
> Sarah
> sarahr at genesearch.com.au
> http://www.troz.net/Rev/
More information about the use-livecode
mailing list