Re: Proposed changes to the combo_box widget

Mark Anderson <[email protected]>
Newsgroups gmane.comp.windows.devel.netwindows
Message-ID <[email protected]>
Michael Flanagan wrote:

>
> I'd like to modify addOption so that you don't need to pass a group. If
> you don't pass a value for the group, I want the default group to be
> 'default'.
>
> Likewise, for the is_enabled param, if you don't pass it I think the
> default value should be 'true' so that if you add an option to a group
> that doesn't exist, it will automatically show up in the combo_box. 

sounds fine.

>
>
> It would be handled somthing along the lines of:
>     if(arguments.length<4) is_enabled = true;
> where the 4th arg is the is_enabled param.
>
> Also, I would like to modify the addOptions() method so that it doesn't
> set this.groupDataAtt[group].enabled value, but lets that get handled by
> the call to addOption().
>
> Thoughts?


To be honest, I think it odd to be dealing with enabled (which is a 
group-level attribute)
in methods which deal with options. That isn't your fault, that is just 
how it is
now. It doesn't make sense to change that in NW though at this point.

As far as I'm concerned, feel free  to make these changes; there was no 
documented default semantic
before, so anyone relying on it would be in trouble; you aren't really 
changing the API,
just extending it.

In Burst, I intend to have an explicit OptionGroup object, which has its 
own methods,
and can contain either Option or OptionGroup children.
Right now, combo_box_widget has all this .enabled and .isGroupSorted stuff
sprinkled all over; they really belong as instance methods (and 
constructor) for a OptionGroup
object.

But that is a deeper change than we'd want to contemplate for NW.

-mda


_______________________________________________
The netWindows developers list: [email protected]
http://netwindows.org/mailman/listinfo/devel_netwindows.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.