check box and closefield

Michael Young m.young at mac.com
Sun Sep 14 23:22:00 EDT 2003


Hello,

I am trying to put text field information into an output text field if 
a check box is true. In addition if I change the check box's text field 
information then I want the check box set to true and the text field 
information sent to output text field. I have written the following 
scripts that appear to work correctly. (Feel free to critique my style, 
since I am still learning.)

Button 1 script:
on mouseUp
   if hilite of me
      then put fld "Field 1" into fld "Output"
      else put "" into fld "Output"
end mouseUp

Field 1 script:
on closefield
   if hilite of btn "Button 1" is false
   then hilite btn "Button 1"
   put fld "Field 1" into fld "Output"
end closefield

What I cannot figure out how to do is create x buttons with x fields 
and send the field information to the output text field in the button 
order, i.e.
button 1 true
button 2 true
button 3 false
button 4 true
button 5 false
button 6 true
etc.

should yield output text field
field 1
field 2
field 4
field 6
etc.

Thank you for your assistance,

Michael
RR 2.1
OS X 10.2.6




More information about the use-livecode mailing list