Hi Cameron

I really wouldn't override UlcComboBox#contentsChanged(ListDataEvent).
This might have unexpected side-effects. For example, renderer-related,
etc.

a) Are you sure that the element that you select on the model is part of
the model elements? b) Is the size of your model bigger than zero?

If there is some default behavior that does not seem right, post a
little sample application for Canoo to look at. Canoo knowing the
internals of ULCComboBox, they can surely give you as explanation as
well as a proper solution.

Etienne



> -----Original Message-----
> From: Cameron Taggart [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 04, 2006 4:35 PM
> To: Etienne Studer
> Cc: [email protected]
> Subject: Re: [ULC-developer] ComboBox List<Date> setSelectedIndex(0)
> 
> I'm only overriding UlcComboBox#contentsChanged(ListDataEvent), making
> it do nothing.
> 
>   /** Without this, it keeps sending the
> DataComboBoxModel#setSelectedItem(Object) a null. */
>   @Override
>   public void contentsChanged(ListDataEvent event){
>     _logger.debug("received event: {}", event);
>     super.contentsChanged(event);
>   }
> 
> I do not understand what contentChanged() is doing that causes it send
> a null to DataComboBoxModel#setSelectedItem(Object).  It seams to be
> creating another event.
> 
> Cameron
> 
> On 5/3/06, Etienne Studer <[EMAIL PROTECTED]> wrote:
> > I'm not sure why you sub-classed the ULCComboBox. I never had a need
for
> > this, even with custom combo box models.
> >
> > Etienne
_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to