Binding only fires when you are hooked into a certain item of the array 
collection changes. So unless you are bound on a certain item, you should 
probably add a listener for CollectionEvent. COLLECTION_ CHANGE yourself and 
handle "by hand" the update.

HTH,
Claudiu



----- Original Message ----
From: Kevin <[EMAIL PROTECTED]>
To: [email protected]
Sent: Wednesday, October 22, 2008 1:26:16 AM
Subject: [flexcoders] Binding Getter to Collection Change


I may be missing something simple here, but I would like to create a
getter function in one of my classes that binds to a collection change
event of an ArrayCollection in the same class.  As a simple example,

public var myCollection: ArrayCollection = new ArrayCollection( );

[Bindable]
public function get mySimpleSum( ):int{
return myCollection. length + 10;
}

I would like to bind the view to the getter so that when myCollection
is modified, the getter will refire and the view will update.  So far
nothing I have tried (such as
[Bindable(event= CollectionEvent. COLLECTION_ CHANGE)]) works...

Thoughts?...

Thanks, Kevin

    


      

Reply via email to