Hi Joerg,

sorry, I modified your code to work in my local qx1.0-playground (see 
below), and it worked very well. So I cannot reproduce your problem. Did 
you double check to clear cache / rebuild after fixing the typo?
If your problem persists, I'd guess it is outside of the code you provided.

Try this in playground:

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);

this.getRoot().add(left, {top: 10, left: 10});
this.getRoot().add(center, {top: 10, left: 40});
this.getRoot().add(right, {top: 10, left: 70});

rg.setModelSelection(["right"]);
this.debug("Selected button: " + this._radiogroup.getSelection()[0]);

rg.addListener("changeSelection", function(evt) {
alert(this.getSelection()[0]);
});

Greetings,
Stefan

On 28.12.2009 00:33, Jörg Sawatzki wrote:
> Hi Stefan,
>
> sorry, that was a typo - of course I am using the array brackets around
> the string - the result is as described: [ undefined ]
>
> Some more ideas? :)
>
> Thanks anyway,
>
> Jörg
>
> Am Sonntag, den 27.12.2009, 23:26 +0100 schrieb Stefan Volbers:
>> Hi Joerg,
>>
>> although I didn't try this, the problem you describe is probably the
>> same as reported quite often in the last weeks:
>> The selection api underwent some harmonization months ago; since then,
>> you have to provide an array when setting a selection manually, as
>> several widgets allow for multiple selection (even when a radio group
>> doesn't). Getting a selection consequently returns an array too.
>> The old behavior was deprecated and doesn't work anymore in 1.0 AFAIK.
>>
>> So if I'm not totally wrong here, the line
>>
>> rg.setModelSelection(["center"]);
>>
>> should get things done.
>>
>> HTH,
>>
>> greetings
>> Stefan
>>
>> PS and a happy new year to anyone!
>>
>> On 27.12.2009 21:25, 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