Skip to main content
Inspiring
August 30, 2013
Question

AlertAccImpl.as error

  • August 30, 2013
  • 0 replies
  • 456 views

I'm working on an app and I'm pretty stuck as the only code that comes up is below. I am trapping the escape key to stop a process. There are no Alerts in the message chain and I'm not quite sure where to go with the information I'm given, which occurs when I press the escape key.

TypeError: Error #1009: Cannot access a property or method of a null object reference.

          at mx.accessibility::AlertAccImpl/eventHandler()

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at mx.core::UIComponent/dispatchEvent()

          at mx.controls.alertClasses::AlertForm/removeAlert()

          at mx.controls.alertClasses::AlertForm/keyDownHandler()

The framework code that it errors out at is the following. It says that systemManager is null. How can one make system manager null?

AlertAccImpl.as:

override protected function eventHandler(event:Event):void

          {

                    // Let AccImpl class handle the events

                    // that all accessible UIComponents understand.

                    $eventHandler(event);

 

                    const systemManager:ISystemManager = ISystemManager(master.parent);

                    var titleBar:UIComponent;

 

                    switch (event.type)

                    {

                              case "close":

                              {

                                        titleBar = Alert(master).getTitleBar();

                                        Accessibility.sendEvent(titleBar,0,AccConst.EVENT_SYSTEM_DIALOGEND);

                                        Accessibility.sendEvent(titleBar,0,AccConst.EVENT_OBJECT_REORDER);

                                        Accessibility.sendEvent(titleBar,0,AccConst.EVENT_OBJECT_DESTROY);

                                        Accessibility.sendEvent(titleBar,0,AccConst.EVENT_OBJECT_LOCATIONCHANGE);

                                        Accessibility.sendEvent(titleBar,0,AccConst.EVENT_OBJECT_PARENTCHANGE);

                                        Accessibility.sendEvent(titleBar,0,AccConst.EVENT_OBJECT_HIDE);

                                        Accessibility.sendEvent(titleBar,0,AccConst.EVENT_SYSTEM_FOREGROUND);

                                        if (systemManager.stage.focus)

                                                  Accessibility.sendEvent(systemManager.stage.focus,0,AccConst.EVENT_OBJECT_FOCUS);

                                        break;

                              }

This topic has been closed for replies.