Hey,

the model selection is a data array which can not be accessed by []. But still, 
it has a length property natively attached which brings some browsers like 
opera to act like it would be a real array. But the browsers do have the same 
problem which results in a empty array as representation. Use getItem and 
setItem as method if you use data arrays and you will be fine. For more 
details, check the API of the data array.

Regards,
Martin


Am 05.01.2011 um 20:53 schrieb <f...@mail.dnttm.ro> <f...@mail.dnttm.ro>:

> Hi.
> 
> This is what I can see in Opera's JS debugger (this.__periodicity is a 
> SelectBox):
> 
>>>> this.__periodicity.getModelSelection()
> Object[]
>>>> this.__periodicity.getModelSelection().length
> 1
>>>> this.__periodicity.getModelSelection()[0]
> undefined
>>>> this.__periodicity.getSelection()
> Array[Object]
>>>> this.__periodicity.getSelection()[0]
> Object
>>>> this.__periodicity.getSelection()[0].getModel()
> "month"
>>>> 
> 
> The code to fill the options for the selectbox is:
> 
> this.__periodicity = new qx.ui.form.SelectBox();
> this.__periodicity.add(new qx.ui.form.ListItem("", null, ""));
> this.__periodicity.add(new qx.ui.form.ListItem("Months", null, "month"));
> this.__periodicity.add(new qx.ui.form.ListItem("Years", null, "year"));
> 
> I would expect this.__periodicity.getSelection()[0].getModel() and 
> this.__periodicity.getModelSelection()[0] to represent the same value. Am I 
> missing something, or is this a bug?
> 
> br,
> 
> flj
> 
> 
> ------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment, and, 
> should the need arise, upgrade to a full multi-node Oracle RAC database 
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to