Setting the value of a button hilite in script

J. Landman Gay jacque at hyperactivesw.com
Tue Dec 13 18:02:14 EST 2011


On 12/13/11 4:50 PM, Pete wrote:
> I wrote myself a script to set the initial values of controls on a card in
> preOpenCard.  It looks for a custom property name cInitialValue, then
> initialises the control to the value of the custom property, depending on
> that type of control (field, button, etc).
>
> I set the value of cInitialValue for checkboxes or radio buttons to either
> true or false. My code then is:
>
> set the hilite of control x of this card to (the cInitialValue of control x
> of this card)
>
> At run time, I get an error  - value is not a boolean (true or false) near
> "false"

It should work unless the value is empty or the control doesn't support 
the hilite property. Does your loop check for empty? Does it always try 
to hilite only buttons?

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list