On Oct 29, 2008, at 10:43 PM, _why wrote:
On Wed, Oct 29, 2008 at 02:51:16PM +0100, François Vaux wrote:
When you create a ListBox, the default choice is empty, which is
weird to me.
I think Shoes should automatically choose the first element from the
:items parameter without having to explicitely use the :choose
parameter.
I will think about this. I guess I figured that it would be
unselected at first. But that isn't really an option is it?
It is just `nil`. I guess I probably agree with you.
_why
I thought that it was a bug in list_box for Windows. OSX always has
the first item selected by default. If I get a vote, I'd vote for
having the first item selected always. This avoids extra code to
select the first item, (albeit small, but forgettable), and extra
code to check for nil values otherwise (again small, but
forgettable). Lastly, if you _really_ want no item selected, it is
easy enough to prepend a blank value to the list you provide.
DZ