3 Replies Latest reply on Apr 4, 2010 9:34 PM by Flex harUI

    Marshalling Error

    emansouri Level 1

      Hello,

       

      All of a sudden I have started to encounter the following error:

       

      TypeError: Error #1116: second argument to Function.prototype.apply must be an array.
          at Function/http://adobe.com/AS3/2006/builtin::apply()
          at mx.managers.marshalClasses::CursorManagerMarshalMixin/marshalCursorManagerHandler()[E:\de v\4.0.0\frameworks\projects\framework\src\mx\managers\marshalClasses\CursorManagerMarshalM ixin.as:475]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.managers.marshalClasses::CursorManagerMarshalMixin/setCursorHandler()
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.managers::CursorManagerImpl/setCursor()
          at mx.managers.dragClasses::DragProxy/showFeedback()
          at mx.managers.dragClasses::DragProxy/mouseMoveHandler()

       

      I am encountering this error when a drag operation starts from a Spark List or Halo Advanced Data Grid component.

       

      I started to see the error when in my overridden dragStartHandler, I manufacture my own DragSource and add it to the DragManager manually.

       

      This is a snippet similar that shows the relevant code being used:

       

                  var dragSource:DragSource = new DragSource();
                  var dragObject:Object = {type:DragDropTypes.FILES,items:items};
                  dragSource.addData(dragObject,DragDropManager.EDUCATOR2_DRAG_ITEMS);
                  var eventPoint:Point = new Point(event.localX, event.localY);
                  DragManager.doDrag(this,dragSource,event,dragProxy,-eventPoint.x+10,-eventPoint.y+10,0.5) ;
                  super.dragStartHandler(event);