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

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

August 5th, 2008

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()

Greg FLEX , , , ,

  1. Karsten Karlsen
    August 30th, 2008 at 00:19 | #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. August 30th, 2008 at 11:40 | #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. Asdrubal
    September 12th, 2008 at 22:14 | #3

    Excelent, just that I need.

    Thank you.

  4. Engin Durmaz
    October 13th, 2008 at 18:28 | #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.

  5. Jeroen Corsius
    November 6th, 2008 at 11:21 | #5

    Hey Greg,

    Thnx for putting the solution online.
    I was also facing this problem, until I found your post!

    Thnx!

  6. Nikasan
    December 8th, 2008 at 00:15 | #6

    Thanks a lot.
    Helps me so much !

  7. zzagtung
    January 7th, 2009 at 01:18 | #7

    Thank you Thank you~

  8. January 14th, 2009 at 18:40 | #8

    Greg,

    Thanks for posting this. I had the exact same issue loading modules with selectable lists and you saved me hours of tracing Adobe class code!

  9. January 14th, 2009 at 18:44 | #9

    Greg,

    Thanks for posting. This was a huge help.

    Cheers,

    Jason

  10. alftuga
    January 28th, 2009 at 17:04 | #10

    Thanks!!! very good help!!!

  11. Igor
    February 18th, 2009 at 18:41 | #11

    Thank you very much Greg,

    Igor

  12. Vic
    February 26th, 2009 at 14:02 | #12

    Greg,

    Thanks for posting. You saved me hours of debugging time!

    Vic

  13. Henk
    March 6th, 2009 at 05:58 | #13

    Thank you Greg,
    Since converting to modules things have been a royal pain.
    This problem made it nearly impossible to use the mouse.
    But not more.
    Thanks again!

    Henk

  14. gyps
    March 11th, 2009 at 09:22 | #14

    Could not find IDragManager in mx.managers package (SDK 3.2.0), so, used DragManager:

    import mx.managers.DragManager;
    private var dragManager:DragManager;

    It works for me. Thanks for post and my saved hours).

  15. April 1st, 2009 at 14:41 | #15

    Good solution, saved a lot of hours!!.

    Thanks

  16. April 22nd, 2009 at 08:20 | #16

    Great!! i’m so grateful!! spent one , long, day trying to solve this problem without having a clue. With your solution it work in 2 secs! (btw i couldnt find the package IDragManager so i used jus DragManager as Gyps said)
    bye

  17. Hung Le
    April 28th, 2009 at 04:01 | #17

    Thanks so much.

    And another problem with HistoryManager (same reason, class text is not included at compile time….!!!!)

    //Flex SDK Error History Manager
    import mx.managers.HistoryManager;
    private var hist:HistoryManager;

  18. dhara
    May 9th, 2009 at 11:50 | #18

    Thanks so much
    its really help me in my project
    It work for me.Thanks for posting

  19. Andy Mc
    May 18th, 2009 at 18:33 | #19

    Yes, I have to echo the thanks of the other posters, I had unfortunately spend some time trying to debug and also look at the SDK code for the Dragmanager, as this error was being raised on list type controls inside my modules, what a PITA that was, thanks for the help!

  20. Prabhu
    May 20th, 2009 at 08:25 | #20

    Thank you Grey, due you this, a huge war has been ended, Thanks a lot

  1. No trackbacks yet.