1 Reply Latest reply on Jul 26, 2009 12:25 PM by David_F57

    Critical mx:list DragDrop Adobe Air problem

    7546445 Level 1

      So I have 2 list controls in an adobe air APP.. Its Really simple... I need to drag item from one list to another. But error happens all the time (Actually I tried All Flex Sdk's I have... 3.2, 3.4, 4.0 ). Please HELP!!!

       

      Here is my code

       

      <?xml version="1.0" encoding="utf-8"?>

      <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo">

      <mx:VBox width="50%" >

       

       

       

       

          <mx:List  dataProvider="{[1, 0]}"

          id="srclist" width="100%" height="100"

          allowMultipleSelection="true"               

          dragEnabled="true"

       

          dropEnabled="true"

          dragMoveEnabled="true"

      />

       

       

       

      <!-- Both drag initiator and drop target -->

      <mx:List 

          id="destlist" width="100%" height="100"

          allowMultipleSelection="true"               

          dragEnabled="true"

       

          dropEnabled="true"

          dragMoveEnabled="true"

      />

      </mx:VBox>

      </s:WindowedApplication>

       

       

      Here is that error

       

      TypeError: Error #1009: Cannot access a property or method of a null object reference.

      at mx.controls.listClasses::ListItemRenderer/commitProperties()[C:\autobuild\3.x\frameworks\ projects\framework\src\mx\controls\listClasses\ListItemRenderer.as:318]

      at mx.core::UIComponent/validateProperties()[C:\autobuild\3.x\frameworks\projects\framework\ src\mx\core\UIComponent.as:5807]

      at mx.managers::LayoutManager/validateClient()[C:\autobuild\3.x\frameworks\projects\framewor k\src\mx\managers\LayoutManager.as:811]

      at mx.managers::NativeDragManagerImpl/doDrag()[C:\autobuild\3.x\frameworks\projects\airframe work\src\mx\managers\NativeDragManagerImpl.as:314]

      at mx.managers::DragManager$/doDrag()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\ managers\DragManager.as:243]

      at mx.controls.listClasses::ListBase/dragStartHandler()[C:\autobuild\3.x\frameworks\projects \framework\src\mx\controls\listClasses\ListBase.as:9085]

      at flash.events::EventDispatcher/dispatchEventFunction()

      at flash.events::EventDispatcher/dispatchEvent()

      at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.x\frameworks\projects\framework\src\m x\core\UIComponent.as:9308]

      at mx.controls.listClasses::ListBase/mouseMoveHandler()[C:\autobuild\3.x\frameworks\projects \framework\src\mx\controls\listClasses\ListBase.as:8822]