Checkmarks in option button

Michael J. Lew michaell at unimelb.edu.au
Thu Nov 20 18:48:30 EST 2003


I've got an option button with a small list of options and I want to 
put a checkmark in front of the options that my users have explored. 
There is a cookbook recipe that sounds ideal:

on menuPick theItem
   put the menuHistory of me into myItemNumber
   if char 1 to 2 of line myItemNumber of me is "!c"
   then delete char 1 to 2 of line myItemNumber of me
   else put "!c" before line myItemNumber of me
   -- This handler just handles the checkmarks. If you
   -- want to do other things in response to a menu choice,
   -- you'll do them here, after the checkmark code. Here's
   -- a simple example:
   answer "You chose" && quote & theItem & quote & "."
end menuPick

If I have that in an option button then two things happen that seem wrong.

Problem 1. The button displays the first option even if the user 
selects another. Something in the script is preventing the button 
from displaying the chosen item as its label because when I comment 
out the script the button works fine, although of course, no 
checkmarks.

Problem 2. The checkmarks show up as !c rather than as checkmarks. 
Something bad has happened to the conversion of !c into a checkmark. 
The same problem occurs if I try !r (an attempt to get a diamond 
instead of a checkmark).

Checkmarks have worked for me in the past. Is this a new issue with Rev 2.1.2?

Has anyone else found this?

-- 
Michael J. Lew

Senior Lecturer
Department of Pharmacology
The University of Melbourne
Parkville 3010
Victoria
Australia

Phone +613 8344 8304

**
New email address: michaell at unimelb.edu.au
**


More information about the use-livecode mailing list