Re: [flexcoders] Re: Reset Radio Button Group
Tim: THanks for the reply. Unfortunately, I'm getting an error when i try and run that code. TypeError: Error #1009: Cannot access a property or method of a null object reference.at mx.controls::RadioButton/get labelPlacement()at mx.controls::Button/http://www.adobe.com/2006/flex/mx/internal::layoutContents ()at mx.controls::Button/mx.controls:Button::updateDisplayList()at mx.controls::RadioButton/mx.controls:RadioButton::updateDisplayList()at mx.core::UIComponent/validateDisplayList()at mx.managers::LayoutManager/::validateDisplayList ()at mx.managers::LayoutManager/::doPhasedInstantiation()at Function/http://adobe.com/AS3/2006/builtin::apply()at mx.core::UIComponent/::callLaterDispatcher2()at mx.core::UIComponent/::callLaterDispatcher () Any idea why I'd be getting that? Thanks! Sam On 10/23/06, Tim Hoff [EMAIL PROTECTED] wrote: Hi Sam, It looks like that method was depreciated. You can use the following function to reset the RadioButtons: public function resetRadioButtons():void{ var n:int = myRadioButtonGroup.numRadioButtons; for (var i:int = 0; i n; i++) { myRadioButtonGroup.getRadioButtonAt (i).selected = false; }} -TH__ Tim Hoff Cynergy Systems, Inc. http://www.cynergysystems.comOffice: 866-CYNERGY --- In [EMAIL PROTECTED]ups.com, Sam Shrefler [EMAIL PROTECTED] wrote: I've found the following reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=c4e4be2f selectedRadio won't compile in Flex Builder 2. Any idea how to do this in Flex 2? Thanks! Sam __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___
[flexcoders] Re: Reset Radio Button Group
Sam, It's hard to tell without seeing your code. I tested the function before posting, so I know it works with my programs. If you can, postyour code and we'll get you going. -TH___ Tim HoffCynergy Systems, Inchttp://www.CynergySystems.comOffice: 1.866.CYNERGY --- In flexcoders@yahoogroups.com, "Sam Shrefler" [EMAIL PROTECTED] wrote: Tim: THanks for the reply. Unfortunately, I'm getting an error when i try and run that code. TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.controls::RadioButton/get labelPlacement() at mx.controls::Button/http://www.adobe.com/2006/flex/mx/internal::layoutContents () at mx.controls::Button/mx.controls:Button::updateDisplayList() at mx.controls::RadioButton/mx.controls:RadioButton::updateDisplayList() at mx.core::UIComponent/validateDisplayList() at mx.managers::LayoutManager/::validateDisplayList() at mx.managers::LayoutManager/::doPhasedInstantiation() at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/::callLaterDispatcher2() at mx.core::UIComponent/::callLaterDispatcher() Any idea why I'd be getting that? Thanks! Sam On 10/23/06, Tim Hoff [EMAIL PROTECTED] wrote: Hi Sam, It looks like that method was depreciated. You can use the following function to reset the RadioButtons: public function resetRadioButtons():void { var n:int = myRadioButtonGroup.numRadioButtons; for (var i:int = 0; i n; i++) { myRadioButtonGroup.getRadioButtonAt(i).selected = false; } } -TH __ *Tim Hoff *Cynergy Systems, Inc. http://www.cynergysystems.com http://www.cynergysystems.comoffice/ Office: 866-CYNERGY--- In flexcoders@yahoogroups.com, "Sam Shrefler" sshrefler@ wrote: I've found the following reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=c4e4be2f selectedRadio won't compile in Flex Builder 2. Any idea how to do this in Flex 2? Thanks! Sam __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___
Re: [flexcoders] Re: Reset Radio Button Group
Tim: Thanks for the help...i got it. I actually was reseting the form on click of a cancel button which also changed the view state. Thefore, the radiobuttons were going away. When the selected setting is called, it seems to call the invalidator, which I believe waits one frame to process...hence the Radiobutton was gone and the error thrown. Instead, i'm calling the reset function on display of the form rather than when its cancelled Thanks! Sam On 10/24/06, Tim Hoff [EMAIL PROTECTED] wrote: Sam, It's hard to tell without seeing your code. I tested the function before posting, so I know it works with my programs. If you can, postyour code and we'll get you going. -TH___ Tim Hoff Cynergy Systems, Inc http://www.CynergySystems.com Office: 1.866.CYNERGY --- In [EMAIL PROTECTED]ups.com, Sam Shrefler [EMAIL PROTECTED] wrote: Tim: THanks for the reply. Unfortunately, I'm getting an error when i try and run that code. TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.controls::RadioButton/get labelPlacement() at mx.controls::Button/http://www.adobe.com/2006/flex/mx/internal::layoutContents () at mx.controls::Button/mx.controls:Button::updateDisplayList () at mx.controls::RadioButton/mx.controls:RadioButton::updateDisplayList() at mx.core::UIComponent/validateDisplayList() at mx.managers::LayoutManager/::validateDisplayList() at mx.managers::LayoutManager/::doPhasedInstantiation () at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/::callLaterDispatcher2() at mx.core::UIComponent/::callLaterDispatcher() Any idea why I'd be getting that? Thanks! Sam On 10/23/06, Tim Hoff [EMAIL PROTECTED] wrote: Hi Sam, It looks like that method was depreciated. You can use the following function to reset the RadioButtons: public function resetRadioButtons():void { var n:int = myRadioButtonGroup.numRadioButtons; for (var i:int = 0; i n; i++) { myRadioButtonGroup.getRadioButtonAt(i).selected = false; } } -TH __ *Tim Hoff *Cynergy Systems, Inc. http://www.cynergys ystems.com http://www.cynergysystems.comoffice/ Office: 866-CYNERGY --- In [EMAIL PROTECTED]ups.com, Sam Shrefler sshrefler@ wrote: I've found the following reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=c4e4be2f selectedRadio won't compile in Flex Builder 2. Any idea how to do this in Flex 2? Thanks! Sam __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___
[flexcoders] Re: Reset Radio Button Group
Hi Sam, It looks like that method was depreciated. You can use the following function to reset the RadioButtons: public function resetRadioButtons():void{ var n:int = myRadioButtonGroup.numRadioButtons; for (var i:int = 0; i n; i++) { myRadioButtonGroup.getRadioButtonAt(i).selected = false; }} -TH__ Tim HoffCynergy Systems, Inc.http://www.cynergysystems.comOffice: 866-CYNERGY --- In flexcoders@yahoogroups.com, "Sam Shrefler" [EMAIL PROTECTED] wrote: I've found the following reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=c4e4be2f selectedRadio won't compile in Flex Builder 2. Any idea how to do this in Flex 2? Thanks! Sam __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___