History | Log In     View a printable version of the current page.  
Issue Details (XML)

Key: SDK-13983
Type: Bug Bug
Status: Open Open
Priority: B B
Assignee: Jason Szeto
Reporter: Lauren Park
Votes: 1
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Flex SDK

Flex B3 DragManager

Created: 12/13/07 10:55 PM   Updated: 06/24/08 12:49 PM
Component/s: Drag and Drop
Security Level: Public (All JIRA Users )

File Attachments: 1. File FlexDragSystemManager.as (0.7 kb)
2. File FlexDragWindowedApplication.as (0.2 kb)
3. XML File listDrag-app.xml (5 kb)
4. File listDrag.mxml (1 kb)


Severity: Incorrectly Functioning
Reproducibility: Every Time
Discoverability: High
Found in Version: None
Milestone: SDK Moxie RC1 and SDK Gumbo - Release
Affected OS(s): All OS Platforms - All
Steps to Reproduce:
http://tech.groups.yahoo.com/group/flexcoders/message/96452

In the previous beta, I could use both the DragManager and
NativeDragManager to handle dropping files into my app, or
dragging/dropping things within my app. It now looks like you get one
or the other. With the NativeDragManagerImpl, you don't get any
control over the alpha level of the dragProxy image. My air app used
to support dropping files from the desktop and also moving things
around internally with the flash drag manager, but now I'm stuck with
the crappy NativeDragManagerImpl for everything. I sure hope this
gets put back the way it was in Beta 2 before the final release. I
don't want one Impl or the other, I need BOTH.



 
 
 
Language Found: English
Bugbase Id: none
Triaged: Yes
Regression: Yes
QA Owner: Joan Lafferty
Participants: Ali Tan Ucer, Jason Szeto, Joan Lafferty, Lauren Park, Mario Rodrigues and Paul Evans


 All   Comments      Sort Order:
Lauren Park - [12/17/07 12:54 PM ]
PFR.

Jason Szeto - [12/19/07 06:49 PM ]
Changed SystemManager.docFrameHandler from private to mx_internal. This will allow developers to subclass SystemManager and register the DragManagerImpl instead of the NativeDragManagerImpl.

Jason Szeto - [12/19/07 06:59 PM ]
I uploaded a workaround to force the application to use the DragManagerImpl class instead of the NativeDragManagerImpl class.

This workaround will only work on build 191577 or later. The comps.FlexDragSystemManager class subclasses SystemManager and overrides the docFrameHandler function to register the DragManagerImpl class before the super class performs the registration.

The comps.FlexDragWindowedApplication associates the FlexDragSystemManager as the root class of the application.

In listDrag.mxml, we use FlexDragWindowedApplication as the root tag of our application.





Lauren Park - [12/20/07 01:26 PM ]
Re-assigned to Joan.

Joan Lafferty - [12/21/07 04:56 PM ]
This workaround works. I tested Jason's bugfiles with build 161651. Closing bug.

Paul Evans - [02/25/08 07:46 AM ]
With the release of 3, (build 3.0.194161) I just tried this workaround on my project using your files attached to this bug. It seems to work so far, but probably worth noting that the workaround causes a number of flex components to move name space notably in my app...

<mx:states>
<mx::transitions>

are now both in the comps name space and must be written...

<comps:states>
<comps:transitions>

Mario Rodrigues - [04/20/08 01:52 AM ]
Hi,

Thanks for this workaround. I was able to get it working, but I've run into a problem when I open new "Windows". When I attempt to close them, I get the following error:

TypeError: Error #1034: Type Coercion failed: cannot convert mx.managers::DragManagerImpl@73e8039 to mx.managers.NativeDragManagerImpl.
at mx.managers::WindowedSystemManager/http://www.adobe.com/2006/flex/mx/internal::cleanup()[E:\dev\3.0.x\frameworks\projects\airframework\src\mx\managers\WindowedSystemManager.as:1684]

Any way to get around this?

Ali Tan Ucer - [05/05/08 10:02 PM ]
I dont want to be rude or anything but personally i disagree about the resolution of this issue. I think it is not resolved in anyway. Suggested workaround seems to me is hacky and also there is no way for a beginner Flex/Air developer to understand this hack. It is kind of essential to have both functionality in many Air application and i like to see a better approach from Adobe for this kind of issues rather than call it resolved and not providing better solution.

 

Joan Lafferty - [05/06/08 09:48 AM ]
I reproduced Mario's problem where you get a RTE when closing a <mx:Window>. I'm re-opening the bug so that we can find a suitable workaround.

Jason Szeto - [05/16/08 06:59 PM ]
Looks like there is a bug in WindowedSystemManager:cleanup(). The drag manager instance shouldn't be cast to a NativeDragManagerImpl when checking the type.

this:

if (NativeDragManagerImpl(Singleton.getClass("mx.managers::IDragManager").getInstance())
is NativeDragManagerImpl)

should be:

if (Singleton.getClass("mx.managers::IDragManager").getInstance()
is NativeDragManagerImpl)

Since this code is in WindowedSystemManager, you'll have to do the same trick of subclassing Window, specifying a new WindowedSystemManager subclass in the Frame metadata and overriding cleanup() in your WindowedSystemManager subclass.

Lauren Park - [06/24/08 12:49 PM ]
Opened to Jason for Flex 4.