clear fields

Bob Hartley rev at armbase.com
Fri Jun 3 13:40:06 EDT 2005


Hi All

I have a script that clears the contents of fields in cards.

on mouseUp
  repeat with x = 1 to the number of flds
   put empty into fld x
end repeat
end mouseUp

Now this works ok except that the card has some labels and the script clears
the label contents. 

All the text fields are called field1, field2 etc

so I thought of doing this
on mouseUp
  repeat with x = 1 to the number of flds
    if the name of fld x is "field &*"
  then put empty into fld x
end repeat
end mouseUp

But I don't ge tthe fields clearing. I tried variations on the "field & *"
etc without any luck.

Any ideas

Cheers
Bob


More information about the use-livecode mailing list