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
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
> *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:
>
--
>> *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
exEvent.CREATION_COMPLETE, formCreatedHandler);
>>> addChild(mf);
>>>
>>> protected function formCreatedHandler(event:FlexEvent):void {
>>> mf.removeEventListener(FlexEvent.CREATION_COMPLETE,
>>> formCreatedHandler);
>>> mf.foo = "bar";
>>> }
>
ew MyForm();
>>>> mf.addEventListener(FlexEvent.CREATION_COMPLETE, formCreatedHandler);
>>>> addChild(mf);
>>>>
>>>> protected function formCreatedHandler(event:FlexEvent):void {
>>>> mf.removeEventList
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
7 matches
Mail list logo