[flexcoders] Question about binding and circular reference

2009-03-11 Thread enriirne
Say I have this: // MyForm.mxml [Bindable] public var foo:String; Is there an elegant way to avoid that foo is cleared upon creation of MyForm? Indeed, if I do this in the main app: var mf:MyForm = new MyForm(); mf.foo = "bar"; addChild(mf); then myText is empty, probably because it's empt

RE: [flexcoders] Question about binding and circular reference

2009-03-11 Thread Yves Riel
oveEventListener(FlexEvent.CREATION_COMPLETE, formCreatedHandler); mf.foo = "bar"; } From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of enriirne Sent: Wednesday, March 11, 2009 8:25 AM To: flexcoders@yahoogroups.com Subject: [flexcode

Re: [flexcoders] Question about binding and circular reference

2009-03-16 Thread Wesley Acheson
> *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On > Behalf Of *enriirne > *Sent:* Wednesday, March 11, 2009 8:25 AM > *To:* flexcoders@yahoogroups.com > *Subject:* [flexcoders] Question about binding and circular reference > > Say I have this: >

Re: [flexcoders] Question about binding and circular reference

2009-03-16 Thread Josh McDonald
-- >> *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On >> Behalf Of *enriirne >> *Sent:* Wednesday, March 11, 2009 8:25 AM >> *To:* flexcoders@yahoogroups.com >> *Subject:* [flexcoders] Question about binding and circular reference >&g

Re: [flexcoders] Question about binding and circular reference

2009-03-17 Thread Wesley Acheson
exEvent.CREATION_COMPLETE, formCreatedHandler); >>> addChild(mf); >>> >>> protected function formCreatedHandler(event:FlexEvent):void { >>> mf.removeEventListener(FlexEvent.CREATION_COMPLETE, >>> formCreatedHandler); >>> mf.foo = "bar"; >>> } >

Re: [flexcoders] Question about binding and circular reference

2009-03-17 Thread Josh McDonald
ew MyForm(); >>>> mf.addEventListener(FlexEvent.CREATION_COMPLETE, formCreatedHandler); >>>> addChild(mf); >>>> >>>> protected function formCreatedHandler(event:FlexEvent):void { >>>> mf.removeEventList

Re: [flexcoders] Question about binding and circular reference

2009-03-17 Thread Wesley Acheson
On Tue, Mar 17, 2009 at 2:38 PM, Josh McDonald wrote: > I re-read the original post, and it makes sense. I always use change > events rather than bindings on the way back from components, which is what > I'd recommend rather than two-way bindings. > Yes that is what I was trying to give as an ans