thanks for the reply, hmm... i just tried that out using addItem(Object) but still no event started. maybe there is some issues with my code, flex builder isnt showing me any errors though. I tracked the content of my ArrayCollection, and it does insert the items correctly. is there something i should be awared of creating the eventlistener?
--- In flexcoders@yahoogroups.com, "Dimitrios Gianninas" <[EMAIL PROTECTED]> wrote: > > it wont get called when u create a new instance... it will get called when call addItem(), removeItem(), etc... > > Dimitrios Gianninas > RIA Developer > Optimal Payments Inc. > > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of martywolf11 > Sent: Wednesday, February 14, 2007 12:41 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Cairngorm: ArrayCollection(ValuObject)-Event on changing data? > > > > hello, > > In my ModelLocator class i defined an ArrayCollection: > > [Bindable] > [ArrayElementType("cairngorm.vo.FriendVO")] > public var friends:ArrayCollection; > > storying the FriendVO object works perfectly, but now i want an event > to fire up whenever i add a new FriendVO object, delete it or change it. > i just tried to use the following command for that: > > MyModelLocator.getInstance().friends.addEventListener(CollectionEvent.COLLECTION_CHANGE,createFriendsList); > > which should invoke the method createFriendsList() > > private function createFriendsList():void > { Alert.show("create friendslist"); } > > but it is never called, not even when i do > MyModelLocator.getInstance().friends = new ArrayCollection(); > > can anybody tell me what i am doing wrong? > i really would appreciate any info. > > thanks, > > marty > > > > > > -- > WARNING > ------- > This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. > > AVIS IMPORTANT > -------------- > Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur. >