Skip navigation
Currently Being Moderated

AlertAccImpl.as error

Aug 29, 2013 11:21 PM

I've posted to the AIR forum but I'm beginning to think this is a Flex framework question. This sounds like the issue (https://issues.apache.org/jira/browse/FLEX-17097) but I've hit a deadend trying to debug this thing.

 

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_LOCATIONCHAN GE);

  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_OB JECT_FOCUS);

 

 

  break;

  }

 
Replies
  • Currently Being Moderated
    Aug 31, 2013 9:18 PM   in reply to John Hall

    There's an Alert somewhere.  Could be in a library.  Put a breakpoint on the Alert.show() and see who calls it.

     

    SystemManager might be null when an object is removed from the display list.

     

    Apache Flex has made some attempts to fix a similar error, but I'm not sure if it will fix your situation.  If you can come up with a simple test case, post it.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points