Libby,
The approach you described is
impossible. Actionscript does not work this way. Once that class
has finished executing it code, it is disposed so no binding would be
possible. Looks like you are going to have to find a way to do this that
fits in with the “event model”. Please describe a
little more about what you are trying to do and we may be able to assist you
better.
BTW, it looks as though you are using the
cairngorm framework… Is this accurate? If so, The
ModelLocator may be a perfect fit for what you are trying to do. Maybe a
temporary value in the model locator to reference back in the command…
Just a thought.
Dustin Mercer
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf
Of Libby
Sent: Tuesday, September 13, 2005
8:07 AM
To: [email protected]
Subject: [flexcoders] Re: How to
create a binding from within an actionscript class file - Impossible?
No takers so I guess it is not possible?
How do you Flex gurus get your model updated
dynamically, or, am I
asking in the wrong group?
--- In [email protected],
"Libby" <[EMAIL PROTECTED]> wrote:
> In my class file I call EventBroadcaster to
dispatch an event that
> eventually retrieves a string into a
Command.onResult(). I need that
> string back in my class file. So, I want to
bind a variable in the
> class file to that onResult method. Could
someone show me how to do
> this? Perhaps there is a way to instantiate
mx:Binding in my class
> file some way, that would do it, but I can't
figure it out.
>
> Or is there a better way (the
"right" way) to do this without coupling
> the class file to the command file?
>
> Thanks,
> Libby
--
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
YAHOO! GROUPS LINKS