Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

AIR Drag and Drop between Windows

former_member10945
Contributor
0 Kudos

I can’t seem to get a simple use case to work:

I have an AIR app that has two <mx:Window> built as separate MXML components, one is called “DragSourceWindow” the other “DragTargetWindow”. Inside the “DragSourceWindow” is a canvas that can be dragged out of the window and dropped into the “DragTargetWindow”.

Code:

“Main AIR App”: http://pastie.caboo.se/private/wxcsvvxglm7aabf3xqta

“DragTargetWindow”: http://pastie.caboo.se/private/ysgv3kpr6suiakutnvt4g

“DragSourceWindow”: http://pastie.caboo.se/private/yybaslwsfz12znygyjvva

SVN Repo: http://zclguialvgrid.googlecode.com/svn/trunk/examples/DragManagerIssue/

Inside each <mx:Window> are some trace messages to see what is going on:

1. When a DragManager.isDragging is true

2. When you drag into a drop target

3. When you drop an item into a drop target

However, once you drop the canvas into a window and mouseover it again the DragManager still thinks a drag is active.

I am using the release versions of FB and AIR.

What am I doing wrong?

1 REPLY 1

former_member10945
Contributor
0 Kudos

Nevermind, you can't use DragManager at all in AIR it seems if you leave a window. You have to directly use the NativeDragManager.

Strange because it seems like the DragManager singleton manages that for you -- but it doesn't.