Flex 3 AdvancedDatagrid cannot convert mx.managers::DragManagerImpl to mx.managers.IDragManager

I was getting this error when clicking my AdvancedDatagrid. This only seemed to occur after converting the app to a module.

The answer to the problem was to add the following to your main application.
Hope this helps you spend a lot less time than I did resolving the problem :)

import mx.managers.IDragManager;
private var iDragManager:IDragManager;

Here is the exact error message:
TypeError: Error #1034: Type Coercion failed: cannot convert mx.managers::DragManagerImpl@2256be49 to mx.managers.IDragManager.
at mx.managers::DragManager$/get impl()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\DragManager.as:152]
at mx.managers::DragManager$/get isDragging()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\DragManager.as:187]
at mx.controls.listClasses::AdvancedListBase/dragScroll()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\controls\listClasses\AdvancedListBase.as:6617]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at ()
at SetIntervalTimer/onTimer()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

About the Author

Greg

4 Responses to “Flex 3 AdvancedDatagrid cannot convert mx.managers::DragManagerImpl to mx.managers.IDragManager”

  1. Hi, Greg. Just wanted to drop by and thank you for posting this. I just stumbled on this exact error, and I had absolutely no idea of what to do about it since the error did not reference my own code. You have indeed saved me from spending a lot of time pulling my hair out. I love the way you can just google an error like this and many times find solutions because people like you take the time to post them. Thank you very much.

  2. No problem, that’s why I do it. If we all did it, we’d all develop faster, get paid more and spend less time on tedious problems like this one.

    Glad I could help :)

    -Greg

  3. Excelent, just that I need.

    Thank you.

  4. Hi Greg,
    Thank you very much.
    I faced the same problem after adding the second module in our project.
    With one application and one module in the project, datagrid in the module works fine. But after adding a second module (with another datagrid in it) i got the same error with the second datagrid.
    I changed the loading sequence of the modules and saw that this error occurs only for the datagrid in the last loaded module.

    After one hour of searching what’s wrong with our project and trying several nonsense solutions in vain, i finally found your post and it solved the problem.

    Thanks.

Leave a Reply

You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <blockquote cite=""> <code> <em> <strong>


Warning: stristr() [function.stristr]: Empty delimiter in /home/thegard5/public_html/gregjessup/wp-content/plugins/wassup/wassup.php on line 2093