2 Replies Latest reply on Nov 12, 2010 2:04 PM by Peter deHaan

    Problem in setting  Maximum number of rows visible in the <s:ComboBox> control list using flex4.

    DivyaMahendran

      hi all,

       

       

      I am new to flex, I have problem in setting  Maximum number of rows visible in the <s:ComboBox> control list using flex4.

      i did it using

       

      <s:ComboBox  id="txtgoing"  dataProvider="{countries}"  >               
                      <s:layout>
                          <s:VerticalLayout gap="0" 
      requestedRowCount="2"  />                                     
                      </s:layout>
                  </s:ComboBox>

       

      it gets data from the dataprovider. using this code i have reduced the number of rows in the combobox. The problem now is if i try to delete the data in the combobox

      it shows the following error

       

       

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at spark.components.supportClasses::DropDownListBase/http://www.adobe.com/2006/flex/mx/internal::positionIndexInView()[E:\dev\4.x\frameworks\pr ojects\spark\src\spark\components\supportClasses\DropDownListBase.as:655]
          at spark.components.supportClasses::DropDownListBase/http://www.adobe.com/2006/flex/mx/internal::changeHighlightedSelection()[E:\dev\4.x\framew orks\projects\spark\src\spark\components\supportClasses\DropDownListBase.as:634]
          at spark.components::ComboBox/textInput_changeHandler()[E:\dev\4.x\frameworks\projects\spark \src\spark\components\ComboBox.as:914]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.core::UIComponent/dispatchEvent()[E:\dev\4.x\frameworks\projects\framework\src\mx\core \UIComponent.as:12528]
          at spark.components.supportClasses::SkinnableTextBase/textDisplay_changeHandler()[E:\dev\4.x \frameworks\projects\spark\src\spark\components\supportClasses\SkinnableTextBase.as:1625]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.core::UIComponent/dispatchEvent()[E:\dev\4.x\frameworks\projects\framework\src\mx\core \UIComponent.as:12528]
          at spark.components::RichEditableText/textContainerManager_flowOperationCompleteHandler()[E: \dev\4.x\frameworks\projects\spark\src\spark\components\RichEditableText.as:4320]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at flashx.textLayout.container::TextContainerManager/dispatchEvent()[C:\Vellum\branches\v1\1 .1\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManager.a s:1472]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at flashx.textLayout.elements::TextFlow/dispatchEvent()[C:\Vellum\branches\v1\1.1\dev\output \openSource\textLayout\src\flashx\textLayout\elements\TextFlow.as:773]
          at flashx.textLayout.edit::EditManager/finalizeDo()[C:\Vellum\branches\v1\1.1\dev\output\ope nSource\textLayout\src\flashx\textLayout\edit\EditManager.as:533]
          at flashx.textLayout.edit::EditManager/doOperation()[C:\Vellum\branches\v1\1.1\dev\output\op enSource\textLayout\src\flashx\textLayout\edit\EditManager.as:472]
          at flashx.textLayout.edit::EditManager/deletePreviousCharacter()[C:\Vellum\branches\v1\1.1\d ev\output\openSource\textLayout\src\flashx\textLayout\edit\EditManager.as:1050]
          at flashx.textLayout.edit::EditManager/keyDownHandler()[C:\Vellum\branches\v1\1.1\dev\output \openSource\textLayout\src\flashx\textLayout\edit\EditManager.as:308]
          at flashx.textLayout.container::ContainerController/keyDownHandler()[C:\Vellum\branches\v1\1 .1\dev\output\openSource\textLayout\src\flashx\textLayout\container\ContainerController.as :2226]
          at flashx.textLayout.container::TextContainerManager/keyDownHandler()[C:\Vellum\branches\v1\ 1.1\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManager. as:1761]
          at spark.components.supportClasses::RichEditableTextContainerManager/keyDownHandler()[E:\dev \4.x\frameworks\projects\spark\src\spark\components\supportClasses\RichEditableTextContain erManager.as:640]

       

      pls suggests.

       

       

      regards,

      M.Divya.