0 Replies Latest reply on Jun 21, 2010 6:05 PM by barnetj1

    Problem with switching states

    barnetj1

      Hello,

      I am currently experiencing a problem in flex 4. I have a main container that was built with catalyst, and now I am adding modules to the application. The main container has about 20 states, and each state displays a different module. At the bottom of the container is are multiple custom components, and its sole purpose is to navigate through each individual state of the main container.. We also have a logout button at the top of the container, which returns the user to the first state of the app, this logout is just a richtext component, which has a click handler. All the click handler does is

       

      currentState='firstState';

       

      This works logout text, works until I reach a certain point as the user app(as the user drills further down into the app)

       

      Example:

      //Each state is a state in the container

      State 1-> State 2-> State 3-> State 4->

       

      At state 4 the application will spit this stack out in the flash player debugger..

       

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at flashx.textLayout.factory::TextFlowTextLineFactory/createTextLines()[C:\Vellum\branches\v 1\1.0\dev\output\openSource\textLayout\src\flashx\textLayout\factory\TextFlowTextLineFacto ry.as:109]
          at spark.components::RichText/createTextLines()[E:\dev\4.0.0\frameworks\projects\spark\src\s park\components\RichText.as:1279]
          at spark.components::RichText/http://www.adobe.com/2006/flex/mx/internal::composeTextLines()[E:\dev\4.0.0\frameworks\pro jects\spark\src\spark\components\RichText.as:1170]
          at spark.components.supportClasses::TextBase/updateDisplayList()[E:\dev\4.0.0\frameworks\pro jects\spark\src\spark\components\supportClasses\TextBase.as:684]
          at spark.components::RichText/updateDisplayList()[E:\dev\4.0.0\frameworks\projects\spark\src \spark\components\RichText.as:1128]
          at mx.core::UIComponent/validateDisplayList()[E:\dev\4.0.0\frameworks\projects\framework\src \mx\core\UIComponent.as:8531]
          at mx.managers::LayoutManager/validateDisplayList()[E:\dev\4.0.0\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:663]
          at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.0.0\frameworks\projects\frame work\src\mx\managers\LayoutManager.as:736]
          at mx.managers::LayoutManager/validateNow()[E:\dev\4.0.0\frameworks\projects\framework\src\m x\managers\LayoutManager.as:795]
          at mx.core::UIComponent/commitCurrentState()[E:\dev\4.0.0\frameworks\projects\framework\src\ mx\core\UIComponent.as:9822]
          at mx.core::UIComponent/setCurrentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\ core\UIComponent.as:9701]
          at mx.core::UIComponent/set currentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:6087 ]
          at Main/logout_Link_clickHandler()[C:\development\Main.mxml:47]
          at Main/___Main_Logout_LinkCustomComponent1_click()[C:\development\src\Main.mxml:1903]