0 Replies Latest reply on Aug 31, 2007 11:24 PM by aligned2009

    dragSource null during DRAG_START?

    aligned2009 Level 1
      Why is dragSource null when the DRAG_START event fires? The docs for the DRAG_START constant describe dragSource as "The DragSource object containing the data being dragged." . Wouldn't this imply that the item being dragged would be in dragSource at DRAG_START?

      private function listenForUpdate():void{
      myTree.addEventListener(DragEvent.DRAG_START, handleDragStart);
      }

      private function handleDragStart(event:DragEvent):void{
      var ds:DragSource=event.dragSource;
      //Breakpoint - ds is null
      }


      <mx:Tree id="myTree"
      height="100%"
      width="100%"
      labelField="@label"
      dataProvider="{tree_xml}"
      change="treeSelected(event)" //some other event
      dragEnabled="true" dragMoveEnabled="false"
      dropEnabled="true"
      />