4 Replies Latest reply on Aug 26, 2010 10:20 AM by j.ochoa

    Popup close problem

    Jeroen Bellen

      Hello,

       

      I'm currently developing  a custom dateChooser component which can display multiple months at once. I created a popup window witch contains the months and created an event that fires when a date is selected. Now all this works, but when I try to close the popup I get an error.

       

      Source:

       

       

      private function dateSelected(event:DateChangedEvent):void {

           trace(event.selectedDate);                         // The trace displays the date

           PopUpManager.removePopUp(dpw);

      }

       

       

      The error:

       

       

      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:12266]

      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::CalendarLayout/mouseUpHandler()[E:\dev\4.0.0\frameworks\projects\framework\s rc\mx\controls\CalendarLayout.as:2497]

       

      Any help is appreciated!