Just don't use a listener on "changeValue". Look at the API on SelectBox in the
development version

        http://demo.qooxdoo.org/devel/apiviewer/#qx.ui.form.SelectBox

Switch on "inherited" and look at the event changeValue. It says
"deprecated" there as well.

The listener on changeSelection should be all you need.

Cheers,
Fritz

On Tue, 18 Aug 2009, skar wrote:

> Hi,
>
> I'm using a selectbox and when I press <SpaceBar> I get the choices pop
> up. However, if I use arrow keys to select a choice and press "Enter" or
> "SpaceBar" on the choice, nothing happens.
>
> If I click on a choice, the correct item is selected and inside my
> listener I do this:
>
>>       var per_page_choices = ['10','25','50'];
>>       var per_page_field = new qx.ui.form.SelectBox();
>>       per_page_field.setWidth(60);
>>       for (var j=0; j < per_page_choices.length; j++)
>>       {
>>         var tempItem = new qx.ui.form.ListItem().set({label :
>> per_page_choices[j]});
>>         per_page_field.add(tempItem);
>>       }
>>
>>       per_page_field.addListener("changeValue", function(e) {
>>         this.debug("ChangeValue: " + e.getData());
>>       }, per_page_field);
>>
>>       per_page_field.addListener("changeSelection", function(e) {
>>         this.debug("ChangeSelection: " + e.getData()[0].getLabel());
>>       }, per_page_field);
>>
>> 928038 The method 'qx.ui.form.ListItem.prototype.getValue()' is
>> deprecated: The value is deprecated. Please use label or userData
>> instead.Native.js (line 55)
>> 928054 undefined qx.log.Logger:223 qx.log.Logger:244
>> qx.ui.form.ListItem:163 qx.ui.form.List:249 qx.Interface:458
>> qx.ui.form.SelectBox:315 qx.event.dispatch.Direct:99 qx.Interface:458
>> qx.event.Manager:815 qx.event.Registration:327 qx.core.Object:549
>> qx.ui.core.MSingleSelectionHandling:162 qx.event.dispatch.Direct:99
>> qx.Interface:458 qx.event.Manager:815 qx.event.Registration:327
>> qx.core.Object:549 qx.ui.core.SingleSelectionManager:245
>> qx.ui.core.SingleSelectionManager:141
>> qx.ui.core.MSingleSelectionHandling:97 qx.Interface:458
>> qx.ui.form.SelectBox:478 qx.ui.core.EventHandler:270
>> qx.event.dispatch.AbstractBubbling:211 qx.event.Manager:815
>> qx.event.Registration:294 qx.event.handler.Mouse:194
>> qx.event.handler.Mouse:378 qx.event.GlobalError:92 qx.lang.Function:394
> However, the listener produces the above warning, but of course gives
> the correct value to my listener. Any idea on how to eliminate this warning?
>
> cheers,
> skar.
>
>

-- 
Oetiker+Partner AG              tel: +41 62 775 9903 (direct)
Fritz Zaucker                        +41 62 775 9900 (switch board)
Aarweg 15                            +41 79 675 0630 (mobile)
CH-4600 Olten                   fax: +41 62 775 9905
Schweiz                         web: www.oetiker.ch

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to