|
|
|
[
Permlink
| « Hide
]
Lauren Park - [12/17/07 12:54 PM ]
PFR.
Changed SystemManager.docFrameHandler from private to mx_internal. This will allow developers to subclass SystemManager and register the DragManagerImpl instead of the NativeDragManagerImpl.
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. This workaround works. I tested Jason's bugfiles with build 161651. Closing bug.
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> 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? 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.
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.
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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||