FocusManager Exceptions
Monday August 20, 2007
Another strange exception in the FocusManager prompted me to open up the SDK source.
I was loading in a Flash 9 SWF into a Flex application at the time.
If you get exceptions about the variable “o” being null, alter this method around Line 583 of the FocusManager.as file to include the following SystemManager type check:
private function isParent(p:DisplayObjectContainer, o:DisplayObject):Boolean
{
if (p is IRawChildrenContainer)
  return IRawChildrenContainer(p).rawChildren.contains(o);
if (p is SystemManager)
return false;
return p.contains(o);
}