RE: [flexcoders] Re: AIR drag/drop via asynchronous download

2008-05-16 Thread Battershall, Jeff
The way I approached this problem was having my command class fire off
delegates for each download and listen for a successful download event.
When the all the files in my batch have been downloaded, I updated a
watched variable in my  ModelLocator, which in turn executed other
logic.

Jeff

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Steve Carpenter
Sent: Friday, May 16, 2008 9:35 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: AIR drag/drop via asynchronous download


I'm trying to create a drag/drop app where the data to be 'dropped' is
actually on a remote filesystem. I'm using Cairngorm I have a Command
that is fired by NativeDragComplete in the View and downloads the
selected files to a temp directory, then populates the Clipboard with an
AIR File list of those files. So far so good, but obviously the
drag/download operation is asynchronous, so can I create some kind of
callback to the drag handler in the View so that it knows when the
clipboard data is ready, or just tell the Command where the drag went?
Or is there a better way to do this?




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
Links





RE: [flexcoders] Re: AIR drag/drop via asynchronous download

2008-05-16 Thread Battershall, Jeff
In my case, I was using a Tree control. Each element contains the meta
data I need to have to drive the download process. When I start the
drag, I take the data provider and create an array of value objects that
I add to the drag source by dragSource.addData(resultItems,items);

Jeff

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Steve Carpenter
Sent: Friday, May 16, 2008 11:32 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: AIR drag/drop via asynchronous download


Thanks Jeff - that's pretty much where I'm up to; I've implemented a
ChangeWatcher that watches for an update on the ModelLocator, indicating
completion of the download process. 

My problem now is how to make all this work with a TileList (my drag
source) so that I can drag 'files' out of the TileList, then download
them and copy the files into whatever target the user dragged to.




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
Links