<mx:Binding source="sessionUsers" destination="sessionUsersToString"/>
try changing to
<mx:Binding source="{ sessionUsers }" destination="sessionUsersToString"/>
DK
Hi Douglas,
First, Thanks for your response :On 8/7/06, Douglas Knudsen < [EMAIL PROTECTED] > wrote:doesn't that custom setter need to broadcast a change event?
I'm no AS master yet, but I wouldn't expect the below to work. Why would a change in sessionUsers fire your getter/setter for sessionUsersToString, eh?
The binding triggers the first time I recieve the data from the server, so is correct.
Due to this line:
<mx:Binding source="sessionUsers" destination="sessionUsersToString"/>
The line says "if sessionUsers change execute the implicit setter for sessionUsersToString
and then the binding in the textinput should execute...
<mx:TextInput id="stringResult" text="{sessionUsersToString}"/>Try creating a function sessionUsersToString() with this signature
public function sessionUsersToString( acIn:ArrayCollection ) : String {}
Then have
<mx:TextInput id="stringResult" text="{sessionUsersToString( sessionUsers )}"/>
Now, if sessionUsers is changed, binding events should fire, and sessionUsersToString() is triggered.
I tried this solution but I can't get it work too :(
Thanks for your idea and for your time :)DK
On 8/7/06, Joost Nuijten < [EMAIL PROTECTED]> wrote:The Flex components use a little trick to make the binding work. They apply an event listener to a collection.
Van: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com ] Namens Gareth Edwards
Verzonden: maandag 7 augustus 2006 6:56
Aan: flexcoders@yahoogroups.comOnderwerp: Re: [flexcoders] [Flex 2][ArrayCollection][Bug] Bindings don't executing when setting AC to a new ArrayCollection()I'm a little confused, it seems it works o.k in the example?
http://www.adobe.com/devnet/flex/quickstart/using_data_providers/
Whats occurring in the above example?
Cheers
Gareth.
Matt Chotin wrote:If you are bound to the ArrayCollection then manipulating the AC itself doesn't re-trigger the binding. You need to do a re-assignment. If that isn't working make sure that the variable for your AC is [Bindable] and if you wrote a setter and used [Bindable(event="…")] that you actually dispatched the event.
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com ] On Behalf Of Carlos Rovira
Sent: Sunday, August 06, 2006 10:25 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] [Flex 2][ArrayCollection][Bug] Bindings don't executing when setting AC to a new ArrayCollection()
Hi,
I'm experiencing a bug with an ArrayCollection. I want to remove the contents and the new state should dispatch a Binding, but this is not happen at all.
I was trying several methods:
* setting to null;
* new ArrayCollection();
* calling removeAll()
* calligin refresh() as well
but nothing happens.
I suppose that this should be a known issue, anyone knows some trick to avoid this problem?
Thanks.
--
::| Carlos Rovira
::| http://www.carlosrovira.com--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?
--
::| Carlos Rovira
::| http://www.carlosrovira.com
--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it? __._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___