Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Adobe Flex SDK Previous
-
None
-
Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Browser: Internet Explorer 7.x
Language Found: English
Description
Steps to reproduce:
1. attach an event listener to creation complete
2. attempt to access mx.core.Application.application
Actual Results:
returns null
Expected Results:
an instance of the running Application
Workaround (if any):
There is no workaround.
Notes:
This causes all flex applications < 4.0 that use Application.application to break.
on lines #309 of the mx.core.Application class contains:
return FlexGlobals.topLevelApplication as Application;
since this line of code is within mx.core.Application it attempts to cast the value of topLevelApplication to the mx.core.Application type... in a Flex 5 Gumbo project, FlexGlobals.topLevelApplication is a spark.components.Application type. This line of code attempts to cast a spark.components.Application to an mx.core.Application resulting in a null value.
Fix:
do not cast FlexGlobals.topLevelApplication.