1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| /*
* Note: here are two reasons that 'application' is typed as Object
* rather than as Application. The first is for consistency with
* the 'parentApplication' property of UIComponent. That property is not
* typed as Application because it would make UIComponent dependent
* on Application, slowing down compile times not only for SWCs
* for also for MXML and AS components. Second, if it were typed
* as Application, authors would not be able to access properties
* and methods in the <Script> of their <Application> without
* casting it to their application's subclass, as in
* MyApplication(Application.application).myAppMethod().
* Therefore we decided to dispense with strict typing for
* 'application'.
*/
public static function get application():Object
{
return ApplicationGlobals.application;
} |