Maybe event.target.parent; Tracy
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of williamkusumo Sent: Monday, August 27, 2007 8:38 PM To: [email protected] Subject: [flexcoders] Re: Problem with ArrayCollection inside an Object It'd be nice if Flex have the ability to pass in a custom argument when you add an event listener and have that argument be available in the function handler. Is that possible? --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "williamkusumo" <[EMAIL PROTECTED]> wrote: > > I think this might be a classic programming questions rather than Flex's. > > I have a custom Object with an ArrayCollection as one of its property. > I added a COLLECTION_CHANGE listener on that ArrayCollection. In its > handler function, I need a reference to the object that contains the > ArrayCollection. > > Yes, I could've had the object as a global instance so I can access it > directly in the function, but another caveat to this is there could be > several of these objects, and looping through them one by one to find > if they own a particular ArrayCollection might not be a choice. > > Is there another way to somehow obtain a reference to the > ArrayCollection owner's object? > > Thanks! >

