Hi once again,

forget it - what I just described was not the issue.
The problem was, that the radigroup was disabled - calling
rg.setEnabled(true) and then do the rg.setModelSelection(align) works!

Jörg

Am Montag, den 28.12.2009, 18:12 +0100 schrieb Jörg Sawatzki:
> Hi Martin, hi Stefan,
> 
> thanks for your ideas. I finally solved the issue.
> 
> What I was trying to do:
> 
> radiogroup.setModelSelection([myobj.getAlign()]);
> 
> This resulted in:
> 
> radiogroup.getSelection() == [undefined]
> (an array with one element which is undefined)
> 
> Finally, the solution is this:
> 
> var align = myobj.getAlign();
> radiogroup.setModelSelection([align]);
> 
> I don't know why, but this works! :o)
> 
> Thanks again!
> 
> Have a good day,
> 
> Jörg
> 
> 
> Am Montag, den 28.12.2009, 00:52 -0800 schrieb MartinWittemann:
> > Hello Jörg,
> > we intorduced the modelSelection in 0.8.3 with native arrays as data types
> > which was not the best idea for the binding. So we had to move away from the
> > native arrays to data arrays to get the binding working as it should.
> > With that change, the API of the array changed unfortunately.
> > (http://demo.qooxdoo.org/current/apiviewer/#qx.data.Array) But using the
> > splice method in this scenario should work on both arrays:
> > 
> > var selection = rg.getModelSelection();
> > selection.splice(0, selection.getLength(), "center");
> > 
> > I hope that works for you.
> > Best,
> > Martin
> > 
> > 
> > 
> > 
> > Jörg Sawatzki wrote:
> > > 
> > > Hey folks,
> > > 
> > > I hope you all had nice Christmas days and didn't eat and drink too
> > > much :)
> > > 
> > > When migrating from qx 0.8.3 to 1.0 I noticed some strange thing: In my
> > > app I have got a RadioGroup with three buttons for text alignment, they
> > > have models assigned:
> > > 
> > > var left = new qx.ui.toolbar.RadioButton(null,
> > > "icon/22/actions/format-justify-left.png");
> > > left.setModel("left");
> > > var center = new qx.ui.toolbar.RadioButton(null,
> > > "icon/22/actions/format-justify-center.png");
> > > center.setModel("center");
> > > var right = new qx.ui.toolbar.RadioButton(null,
> > > "icon/22/actions/format-justify-right.png");
> > > right.setModel("right");
> > > 
> > > var rg = this._radiogroup = new qx.ui.form.RadioGroup(left, center,
> > > right);
> > > 
> > > If I now do:
> > > 
> > > rg.setModelSelection("center");
> > > this.debug(this._radiogroup.getSelection()[0]);
> > > 
> > > And finally, the debug window shows me "undefined" as the currently
> > > selected item. I am quite confused because this has always worked
> > > before. Did anything change in qx 1.0?
> > > 
> > > Thanks in advance,
> > > 
> > > Jörg
> > > 
> > > 
> > > 
> > > 
> > > 
> > > ------------------------------------------------------------------------------
> > > This SF.Net email is sponsored by the Verizon Developer Community
> > > Take advantage of Verizon's best-in-class app development support
> > > A streamlined, 14 day to market process makes app distribution fast and
> > > easy
> > > Join now and get one step closer to millions of Verizon customers
> > > http://p.sf.net/sfu/verizon-dev2dev 
> > > _______________________________________________
> > > qooxdoo-devel mailing list
> > > qooxdoo-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> > > 
> > > 
> > 
> 
> 
> 
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel



------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to