Image not found: https://www.mikecann.blog/wp-content/uploads/2010/01/ScreenHunter_04-Jan.-11-22.36.jpg
Well I was just doing some audio book organising and realised that it would be great if I could drag and drop a folder straight from my AIR into iTunes ready for upload to my iPhone.
Anyways after a little searching through the docs I came up with this little ditty:
var cp : Clipboard = new Clipboard();
cp.setData(ClipboardFormats.FILE_LIST_FORMAT, [new File(book.url)], false);
NativeDragManager.doDrag(null,cp);
Which gets fired by my DataGrid in the view:
itemEditEnd="{dispatchEvent(new BooksEvent(BooksEvent.PROPERTY_CHANGED));}"
dragEnabled="true"
dragStart="{dispatchEvent(new BooksEvent(BooksEvent.BOOK_BEGIN_DRAG, AudioBookModel(event.currentTarget.selectedItem)))}">
Its pretty cool.
Anyways, the latest version and the source is below: