flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Glasser <dglas...@pobox.com>
Subject Re: Using Flex Drag Manager in AIR WindowedApplication
Date Sun, 09 Aug 2015 21:51:19 GMT
Thanks Rudolf, but that didn't work. Same exact behavior. And what's interesting is that the
mouse cursor appears over the main application window when I'm dragging as well. It disappears
in the window in which I'm dragging, but the app is obviously tracking the mouse location
in the window in which I'm dragging, because when I (blindly) drag over something that won't
accept the drop, the mouse cursor gets the additional red circle-X, and when I (blindly) drop
over something that can accept it, the drop code works as expected.

      From: Rudolf Schnetler <rudolf@stripedog.com>
 To: users@flex.apache.org; Dave Glasser <dglasser@pobox.com> 
 Sent: Sunday, August 9, 2015 5:11 PM
 Subject: Re: Using Flex Drag Manager in AIR WindowedApplication
   
Try setting setting 'mouseChildren = false' in the application window
before dragging and to true when drag finished.





On Mon, Aug 10, 2015 at 5:22 AM, Dave Glasser <dglasser@pobox.com> wrote:

> 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 application.
>
> 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:
>
> <s:WindowedApplication
>    xmlns:fx="http://ns.adobe.com/mxml/2009"
>    xmlns:mx="library://ns.adobe.com/flex/mx"
>    xmlns:s="library://ns.adobe.com/flex/spark"
>    useNativeDragManager="false">
>
>
> 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))
>            sm.popUpChildren.addChild(dragProxy);
>
>
> 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?
>
>
>
>


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