Checkbox/field related question

Klaus Major klaus at major-k.de
Tue Mar 1 15:44:09 EST 2005


Hi Jason,

> Hi Jonathan,
>
> Thanks for your script!  I think I see where you're going with it
> (though the second line is still a little confusing; I'm still grasping
> when to use "me" and/or "target").
>
> What I'm doing instead is using graphics for checkboxes.  So, in my if
> statement, I'm checking as follows:
>
>   if the imageSource of char 1 of line currentLine of field "List 
> Items"
> is "Checkbox Empty"  then
>     set the imageSource of char 1 of line currentLine of field "List
> Items" to "Checkbox Filled"
>   else if the imageSource of char 1 of line currentLine of field "List
> Items" is "Checkbox Filled" then
> 	set the imageSource of char 1 of line currentLine of field "List
> Items" to "Checkbox Empty"
>   end if

since there are only 2 options with checkboxes, you can even shorten 
your script a bit ;-)

   if the imageSource of char 1 of line currentLine of field "List 
Items" = "Checkbox Empty"  then
     set the imageSource of char 1 of line currentLine of field "List 
Items" to "Checkbox Filled"
   else
	set the imageSource of char 1 of line currentLine of field "List 
Items" to "Checkbox Empty"
   end if


Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de



More information about the use-livecode mailing list