flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Glasser <dglas...@pobox.com>
Subject Using Flex Drag Manager in AIR WindowedApplication
Date Sun, 09 Aug 2015 19:22:15 GMT
I'm using Flex 4.13.0. I'm porting a browser-based Flex app to the AIR platform, as a multi-window
application. The main window will be used to configure server connections, and the child windows
will be login sessions to individual servers -- essentially what you would see in the browser-based

The code already uses a lot of drag/drop that works well in the browser. It didn't work so
well in the AIR app, so I switched the AIR app to not use the native drag manager, but rather
the same DragManagerImpl class as the browser app, by doing this in the main MXML file:


Anyway, a lot of the problems I had with the native drag manager have gone away. But there's
one huge new problem. The DragProxy is parented by the main application window, so while I'm
dragging something within a child window, I see my dragImage (which is parented by the DragProxy)
moving around within the main application window.

In DragManagerImpl.doDrag(), I see this:

        // The drag proxy is a UIComponent with a single child -
        // an instance of the dragImage.
        dragProxy = new DragProxy(dragInitiator, dragSource);

        var e:Event; 
        if (hasEventListener("popUpChildren"))
            e = new DragEvent("popUpChildren", false, true, dragProxy);
        if (!e || dispatchEvent(e))    

And here, sm seems to always be the ISystemManager of the main application window. I don't
see any other code where the DragProxy is added to the display list.

Does anyone have any ideas how I can get this to work? 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message