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



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.
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
Excelent, just that I need.
Thank you.
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.
Hey Greg,
Thnx for putting the solution online.
I was also facing this problem, until I found your post!
Thnx!
Thanks a lot.
Helps me so much !
Thank you Thank you~
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!
Greg,
Thanks for posting. This was a huge help.
Cheers,
Jason
Thanks!!! very good help!!!
Thank you very much Greg,
Igor
Greg,
Thanks for posting. You saved me hours of debugging time!
Vic
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
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).
Good solution, saved a lot of hours!!.
Thanks
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
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;
Thanks so much
its really help me in my project
It work for me.Thanks for posting
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!
Thank you Grey, due you this, a huge war has been ended, Thanks a lot