1 person found this helpful
FlexGlobals.topLevelApplication is an object just like Application.application. The object is either a spark application or a mx application. FlexGlobals.topLevelApplication.systemManager should do what you want.
I see what you are saying.
FlexGlobals.topLevelApplication is an Object.
Need to cast assuming you know what it will be. I will have to cast until hit correct one.
The s:Application and mx:Application just happen to have the same names.
As I see it, they are from different class hierarchies and very little in common.
I would have expected a common superclass with a systemManager property if they were related.
You don't have to but you can cast either application to IUIComponent and use the systemManager property.
Casting to IUIComponent sounds good.
Looking back at Reference documents, UIComponent looks like the common superclass where they branch off with the systemManager.