[plt-scheme] Default value for choices%

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Oct 20 10:59:39 EDT 2002

At Sat, 19 Oct 2002 22:48:29 +0100, "Paulo Jorge O. C. Matos" wrote:
> I'm using 3 choices% (day, month, year) to get a date. How can I default 
> each value of choices% to todays date? An option of choices% called 
> default would be great. How can I do this?
> I'm trying some things but it seems that the default is always the first 
> of the list passed to choices option. Any ideas?

As of version 202, the only way to set the choice selection is to call
the `set-selection' method after creating the object.

In CVS, I've exp-tagged a change to MrEd so that choice% has a
`selection' init argument. I also added a `value' init argument to
check%, and a `selection' init argument to radio-box% and list-box%.

In the init argument order, each new argument follows the `style'
argument. This ordering means that the change is not
backward-compatible, but it seems unlikely to me that anyone relies on
init order past `style'.

I also added a `checked' init argument for checkable-menu-item% (at the
end of the init sequence).

[Many of these changes were requested in the past, and I just never got
around to it.]


Posted on the users mailing list.