1 Reply Latest reply on Apr 22, 2010 8:18 AM by JockMahon

    Titlewindow throws error

    JockMahon

      This moring i updated my sdk to 4.0.0.13875

       

      now when i try to close the window i get the error below

       

      anyone know why, the ItemSearch custom componet is a Spark TitleWindow, if i comment out the removePopUp, i get no error

       

       

      private var myWindow:ItemSearch;

       

      ..

       

                      myWindow= PopUpManager.createPopUp(this,ItemSearch,true) as ItemSearch;
                      myWindow.addEventListener("loaded" , onItemSearchWindowLoad );
                      myWindow.addEventListener("close"  , closeWindow );
                      myWindow.title = "Add item- [ESC to close]"
                      PopUpManager.centerPopUp( myWindow);

       

      ...

       

                  private function closeWindow(e:Event):void
                  {
                      PopUpManager.removePopUp( myWindow);
                  }

       

       

       

       

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at mx.managers::FocusManager/childHideHandler()[E:\dev\4.0.0\frameworks\projects\framework\s rc\mx\managers\FocusManager.as:1744]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.core::UIComponent/dispatchEvent()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\co re\UIComponent.as:12269]
          at mx.core::UIComponent/setVisible()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\ UIComponent.as:3038]
          at mx.core::UIComponent/set visible()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:2997]
          at mx.controls.scrollClasses::ScrollBar/setScrollProperties()[E:\dev\4.0.0\frameworks\projec ts\framework\src\mx\controls\scrollClasses\ScrollBar.as:1378]
          at mx.core::ScrollControlBase/setScrollBarProperties()[E:\dev\4.0.0\frameworks\projects\fram ework\src\mx\core\ScrollControlBase.as:1264]
          at mx.controls::DataGrid/configureScrollBars()[E:\dev\4.0.0\frameworks\projects\framework\sr c\mx\controls\DataGrid.as:2397]
          at mx.controls.listClasses::ListBase/updateDisplayList()[E:\dev\4.0.0\frameworks\projects\fr amework\src\mx\controls\listClasses\ListBase.as:4394]
          at mx.controls.dataGridClasses::DataGridBase/updateDisplayList()[E:\dev\4.0.0\frameworks\pro jects\framework\src\mx\controls\dataGridClasses\DataGridBase.as:682]
          at mx.controls::DataGrid/updateDisplayList()[E:\dev\4.0.0\frameworks\projects\framework\src\ mx\controls\DataGrid.as:1741]
          at mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\4.0.0\frameworks\projects\ framework\src\mx\controls\listClasses\ListBase.as:3962]
          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/doPhasedInstantiationCallback()[E:\dev\4.0.0\frameworks\projec ts\framework\src\mx\managers\LayoutManager.as:1072]