2 Replies Latest reply on Dec 19, 2007 1:25 PM by Peter deHaan

    ListBase selectedIndices error in Flex 3 Beta 3 SDK

    wahrens
      My example works as expected in Flex 2.0.1 Hotfix 3, however it gives the following error when compiled with Flex 3 Beta 3:

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at mx.controls.listClasses::ListBase/get visibleData()[E:\dev\flex_3_beta3\sdk\frameworks\projects\framework\src\mx\controls\listC lasses\ListBase.as:493]
      at mx.controls.listClasses::ListBase/UIDToItemRenderer()[E:\dev\flex_3_beta3\sdk\frameworks\ projects\framework\src\mx\controls\listClasses\ListBase.as:4589]
      at mx.controls.listClasses::ListBase/setSelectionIndicesLoop()[E:\dev\flex_3_beta3\sdk\frame works\projects\framework\src\mx\controls\listClasses\ListBase.as:6223]
      at mx.controls.listClasses::ListBase/ http://www.adobe.com/2006/flex/mx/internal::commitSelectedIndices()[E:\dev\flex_3_beta3\sd k\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:6182
      at mx.controls.listClasses::ListBase/set selectedIndices()[E:\dev\flex_3_beta3\sdk\frameworks\projects\framework\src\mx\controls\l istClasses\ListBase.as:2829]
      at ListTest/init()[C:\development-flex3b3\ListTest\src\ListTest.mxml:20]
      at ListTest/___ListTest_Application1_creationComplete()[C:\development-flex3b3\ListTest\src\ ListTest.mxml:4]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.core::UIComponent/dispatchEvent()[E:\dev\flex_3_beta3\sdk\frameworks\projects\framewor k\src\mx\core\UIComponent.as:9041]
      at mx.core::UIComponent/set initialized()[E:\dev\flex_3_beta3\sdk\frameworks\projects\framework\src\mx\core\UICompone nt.as:1165]
      at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\flex_3_beta3\sdk\frameworks\pro jects\framework\src\mx\managers\LayoutManager.as:696]
      at Function/ http://adobe.com/AS3/2006/builtin::apply()
      at mx.core::UIComponent/callLaterDispatcher2()[E:\dev\flex_3_beta3\sdk\frameworks\projects\f ramework\src\mx\core\UIComponent.as:8450]
      at mx.core::UIComponent/callLaterDispatcher()[E:\dev\flex_3_beta3\sdk\frameworks\projects\fr amework\src\mx\core\UIComponent.as:8393]


      Here's the example code: