5 Replies Latest reply on Nov 6, 2011 10:28 PM by Flex harUI

    Error from Flex 4.5 SDK

    Zolotoj Level 3

      This is a line of code from SDK 4.5. File ComboBoxaccImpl.as line 514:

      if (ComboBox(master).isDropDownOpen && index >=0 && index < ComboBox(master).dataProvider.length)

       

      I am getting here because I am extending ComboBoxGridItemEditor to use it in my editable grids.

      I am getitng the following error:

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

          at spark.accessibility::ComboBoxAccImpl/eventHandler()[E:\dev\4.5.1\frameworks\projects\spar k\src\spark\accessibility\ComboBoxAccImpl.as:514]

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at mx.core::UIComponent/dispatchEvent()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\co re\UIComponent.as:13128]

          at spark.components::List/commitSelection()[E:\dev\4.5.1\frameworks\projects\spark\src\spark \components\List.as:1216]

          at spark.components.supportClasses::DropDownListBase/commitSelection()[E:\dev\4.5.1\framewor ks\projects\spark\src\spark\components\supportClasses\DropDownListBase.as:565]

          at spark.components.supportClasses::ListBase/commitProperties()[E:\dev\4.5.1\frameworks\proj ects\spark\src\spark\components\supportClasses\ListBase.as:939]

          at spark.components::List/commitProperties()[E:\dev\4.5.1\frameworks\projects\spark\src\spar k\components\List.as:1069]

          at spark.components.supportClasses::DropDownListBase/commitProperties()[E:\dev\4.5.1\framewo rks\projects\spark\src\spark\components\supportClasses\DropDownListBase.as:508]

          at spark.components::ComboBox/commitProperties()[E:\dev\4.5.1\frameworks\projects\spark\src\ spark\components\ComboBox.as:725]

          at mx.core::UIComponent/validateProperties()[E:\dev\4.5.1\frameworks\projects\framework\src\ mx\core\UIComponent.as:8209]

          at mx.managers::LayoutManager/validateClient()[E:\dev\4.5.1\frameworks\projects\framework\sr c\mx\managers\LayoutManager.as:957]

          at mx.core::UIComponent/validateNow()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core \UIComponent.as:8067]

          at spark.components.gridClasses::DataGridEditor/setEditedItemPosition()[E:\dev\4.5.1\framewo rks\projects\spark\src\spark\components\gridClasses\DataGridEditor.as:289]

          at spark.components.gridClasses::DataGridEditor/dataGrid_gridItemEditorSessionStartingHandle r()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\gridClasses\DataGridEditor .as:1204]

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at mx.core::UIComponent/dispatchEvent()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\co re\UIComponent.as:13128]

          at spark.components.gridClasses::DataGridEditor/startItemEditorSession()[E:\dev\4.5.1\framew orks\projects\spark\src\spark\components\gridClasses\DataGridEditor.as:798]

       

      Looks like the casting is not needed:

      ComboBox(master).isDropDownOpen

      because master is ComboBox already.

       

      Any idea what to do with this error?

       

      Thanks