6 Replies Latest reply on Jul 29, 2011 10:22 AM by caleem

    ArgumentError: Undefined state 'inactive'.

    Oz-On Level 1

      Hi,

       

      I'm using Flex 4.1.0.16076 and I have a modular application, loading modules by ModuleViewLoader (Cairngorm Module Library).

      When I try to create a popup from the loaded module, I get the following error:

       

      ArgumentError: Undefined state 'inactive'.
           at mx.core::UIComponent/getState()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:10168]
           at mx.core::UIComponent/findCommonBaseState()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:10188]
           at mx.core::UIComponent/commitCurrentState()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:10010]
           at mx.core::UIComponent/commitProperties()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8018]
           at spark.components.supportClasses::GroupBase/commitProperties()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\supportClasses\GroupBase.as:1058]
           at spark.components::Group/commitProperties()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\Group.as:743]
           at mx.core::UIComponent/validateProperties()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:7933]
           at mx.managers::LayoutManager/validateClient()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:863]
           at mx.managers::PopUpManagerImpl/addPopUp()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\PopUpManagerImpl.as:384]
           at mx.managers::PopUpManagerImpl/createPopUp()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\PopUpManagerImpl.as:237]
           at mx.managers::PopUpManager$/createPopUp()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\PopUpManager.as:139]
      

       

      Here is the code that I'm trying to create the popup:

       

      var popup:SubstitutesView = PopUpManager.createPopUp(this, SubstitutesView, true) as SubstitutesView;
                          PopUpManager.centerPopUp(popup);
       
      

       

      I tried to pass "parentApplication" instead of "this" as for the 1st parameter, but no luck. My only guess that there's a problem of attaching the skin of the TitleWindow.

       

      Update: I was about to submit this message as a question, but then had the eureka moment and thought that I should add the TitleWindow class to my main application. Voila, that worked and hopefully this could be an answer to someone else.