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()[E:\dev\4.y\frameworks\p rojects\mx\src\mx\accessibility\AlertAccImpl.as:177]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\4.y\frameworks\projects\f ramework\src\mx\core\UIComponent.as:13152]
at mx.controls.alertClasses::AlertForm/removeAlert()[E:\dev\4.y\framewor ks\projects\mx\src\mx\controls\alertClasses\AlertForm.as:522]
at mx.controls.alertClasses::AlertForm/keyDownHandler()[E:\dev\4.y\frame works\projects\mx\src\mx\controls\alertClasses\AlertForm.as:546]
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;
}