Saving the name of option button in a Save File
Charles Szasz
cszasz at mac.com
Thu Sep 1 20:53:47 EDT 2011
I am using the following script to save fields, checkbox and option buttons. Saving the content of fields works but I have been unsuccessful in saving the names of the option buttons, which are school names.
FUNCTION gatherData pCard
lock screen
lock messages
push card
go to card pCard
put empty into tData
REPEAT WITH f = 1 to the number of fields
put field f into fData
replace ":" WITH "!" in fData
put the short name of field f & ":" & fData & cr after tData
-- END IF
END repeat
REPEAT WITH b = 1 to the number of buttons
IF the style of button b = "checkbox" OR the style of button b = "option"
THEN
put the short name of button b & ":" & the hilite of button b & cr after tData
END IF
END repeat
pop card
return tData
END gatherData
Charles Szasz
cszasz at mac.com
More information about the use-livecode
mailing list