4 Replies Latest reply on Aug 24, 2011 8:00 PM by madhooper

    Using nativeWindow.owner for MXML windows?

    OsmanU Level 1

      I am really interested in using the new nativeWindow.owner feature in my current MXML based spark Windows, but unfortunately I can't find any examples on how to do this. Is it even possible?

       

      Thanks

        • 1. Re: Using nativeWindow.owner for MXML windows?
          Flex harUI Adobe Employee

          It is not supported in Flex 4.  There should already be a bug filed for it,

          but if you can't find one, please file it.

           

          The workaround is to make your own copy of the Window code and add a way to

          set the owner.

          • 2. Re: Using nativeWindow.owner for MXML windows?
            OsmanU Level 1

            I tried making my own copy of the window code but I am getting a runtime error:

             

            ArgumentError: Undefined state 'normalAndInactive'.
                at mx.core::UIComponent/getState()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UICo mponent.as:10168]
                at mx.core::UIComponent/findCommonBaseState()[E:\dev\4.x\frameworks\projects\framework\src\m x\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\c ore\UIComponent.as:8018]
                at spark.components.supportClasses::GroupBase/commitProperties()[E:\dev\4.x\frameworks\proje cts\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/validateProperties()[E:\dev\4.x\frameworks\projects\framework\ src\mx\managers\LayoutManager.as:572]
                at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.x\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:700]
                at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.x\frameworks\projects \framework\src\mx\managers\LayoutManager.as:1072]

            • 3. Re: Using nativeWindow.owner for MXML windows?
              OsmanU Level 1

              I fixed the error. I had to specify a default skin for the Window class which I had copied.

              • 4. Re: Using nativeWindow.owner for MXML windows?
                madhooper Level 1

                Where do you specify a default skin?