A problem with clearing fields on marked cards

DunbarX at aol.com DunbarX at aol.com
Wed Jun 9 15:21:05 EDT 2010


Stephen has a point. If you want, the label fields can have the property 
set to "true", and all other fields can have the property set to   empty. 
Since you already set the locktext of your label fields to "true" (and I assume 
that means that all your other fields have it set to "false") you can write 
a script:

on mouseUp
   repeat with y = 1 to the number of marked cds
      repeat with u = 1 to the number of fields of marked card y
         if the lockText of field u of marked card y is "true" then set the 
isLabel of field u of marked card y to "true"
               else set the isLabel of field u of marked card y to empty
      end repeat
   end repeat
end mouseUp

And from now on, with new fields or changed old ones, you never have to 
worry about whether the field is a label field or not. The property explicitly 
tells you. If you clone or copy any existing fields, the property will 
already be correct.

Craig



More information about the use-livecode mailing list