3 Replies Latest reply on Jun 19, 2006 7:20 PM by TucsonJava

    Accordion Bug

    samagination79
      I have an application where the base state is a login page, on successful login it takes you to a state called 'home'. I have an accordion in a panel in the home state and it doesn't work. Is this a known issue or am I missing something?

      Getting the following error:

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at mx.managers::HistoryManager$/save()
      at mx.containers::Accordion/::commitSelectedIndex()
      at mx.containers::Accordion/mx.containers:Accordion::commitProperties()
      at mx.core::UIComponent/validateProperties()
      at mx.managers::LayoutManager/::validateProperties()
      at mx.managers::LayoutManager/::doPhasedInstantiation()
      at mx.core::UIComponent/::callLaterDispatcher2()
      at mx.core::UIComponent/::callLaterDispatcher()


      Created a simple app to show this error:

      --------------------------------------------------------------------------
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
      <mx:states>
      <mx:State name="home">
      <mx:RemoveChild target="{hbox1}"/>
      <mx:AddChild position="lastChild">
      <mx:HBox x="0" y="0" width="100%" height="100%">
      <mx:Panel width="250" height="100%" layout="absolute">
      <mx:Accordion x="0" y="0" width="100%" height="100%">
      <mx:VBox label="test1" width="100%" height="100%">
      </mx:VBox>
      <mx:VBox label="test2" width="100%" height="100%">
      </mx:VBox>
      </mx:Accordion>
      </mx:Panel>
      <mx:Panel width="100%" height="100%" layout="absolute">
      </mx:Panel>
      </mx:HBox>
      </mx:AddChild>
      </mx:State>
      </mx:states>

      <mx:HBox x="0" y="0" width="100%" height="100%" id="hbox1">
      <mx:Button label="Button" click="currentState='home';"/>
      </mx:HBox>
      </mx:Application>
      ------------------------------------------------------------------------------