Thanks for the reply. To be very specific... I'm trying for any way to achieve this: parentDocument.currentAC (in app) = presentationsSlidesAC (in component), so the main application.mxml has the currentAC updated. (Loose, tight, whatever.)
Here's the DropLabel.mxml component code: <?xml version="1.0" encoding="utf-8"?> <mx:Label xmlns:mx="http://www.adobe.com/2006/mxml" text="{data.pTitle}" dragEnter="draggedInto(event)" dragDrop="testDrop(event)" click="clickHandler(event)" width="220" textAlign="left" color="#ffffff" fontSize="12"> <mx:Metadata> [Event('presentationSelected')] </mx:Metadata> <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.controls.Alert; import mx.core.DragSource; import mx.managers.DragManager; import mx.events.DragEvent; //import flash.data.SQLResult; //import flash.filesystem.File; //import flash.data.SQLStatement; //import flash.data.SQLConnection; //import flash.events.SQLEvent; //import flash.events.SQLErrorEvent; private function draggedInto(event:DragEvent):void { DragManager.acceptDragDrop(this); } private function testDrop(event:DragEvent):void { if (event.dragSource.hasFormat("items")) { var itemsArray:Array = event.dragSource.dataForFormat("items") as Array; // breakpoint, examine itemsArray[0] //Do sql stuff here, which works fine Alert.show(itemsArray[0].sTitle + '\nadded to\n' + this.text); } } [Bindable] private var presentationsSlidesAC:ArrayCollection; //public var selectedPresentation:Object; private function clickHandler(event:MouseEvent):void { //Do sql stuff here, works fine (requery via SELECT), the result is in an arrayCollection called presentationsSlidesAC //I'm trying to simply get this assignment. //parentDocument.currentAC = presentationsSlidesAC; } ]]> </mx:Script> </mx:Label> ----- Original Message ----- From: "Yves Riel" To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] I'm just not seeing it guys/gals... (events/scopes) Date: Wed, 11 Feb 2009 10:13:22 -0500 Your e-mail is not very clear. There are many ways to get the array collection to update. Anyway, if you are using a drop-in item renderer, I suggest that you access the listData property of the itemRenderer. listData has a property called "owner". So you could have your item renderer dispatch an event using the "owner" property. This way, the event will be seen as coming from the list itself. so, from inside the item renderer: listData.owner.dispatchEvent(<your event>); and attach listeners to the list itself to get notified. [IMAGE]