2 Replies Latest reply on Jan 26, 2010 10:21 AM by Flex harUI

    Error #1034: Type Coercion failed: cannot convert flash.events::Event@... to mx.events.ListEvent

    Markus Häcki

      Hi everybody,

       

      I have this message, always when I paste something in my datagrid. I tried to figure out why that is, but I cant find Any ListEvent in the functions which do get called...  Can anyone give me a hint how I could approach to reason of that problem? I tried to comment parts of the code but I still couldn't find the basic of that error...  When I go through all the code with the debugger, I finally get to the UIComponent.as class and the in the meantime the error message gets shown. The debugger goes to the following function:

       

       

          /**

           *  @private

           *  Callback that then calls queued functions.

           */

          private function callLaterDispatcher(event:Event):void

          {

              // trace(">>calllaterdispatcher " + this);

              UIComponentGlobals.callLaterDispatcherCount++;

       

              // At run-time, callLaterDispatcher2() is called

              // without a surrounding try-catch.

              if (!UIComponentGlobals.catchCallLaterExceptions)

              {

                  callLaterDispatcher2(event);

              }

       

              // At design-time, callLaterDispatcher2() is called

              // with a surrounding try-catch.

              else

              {

                  try

                  {

                      callLaterDispatcher2(event);

                  }

                  catch(e:Error)

                  {

                      var callLaterErrorEvent:DynamicEvent = new DynamicEvent("callLaterError");

                      callLaterErrorEvent.error = e;

                      systemManager.dispatchEvent(callLaterErrorEvent);

                  }

              }

              // trace("<<calllaterdispatcher");

              UIComponentGlobals.callLaterDispatcherCount--;

      }

       

       

      Any help is appreciated!

      Thanks Markus