Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

parentApplication and FlexGlobals.topLevelApplication in Flex 4

In Flex 4, are there any differences between parentApplication and FlexGlobals.topLevelApplication? Are referring to the same top level application?

I think both are same; one (parentApplication) belongs to Spark and the other (FlexGlobals.topLevelApplication) belongs to Halo. Is my understanding correct?

like image 822
Vijey Avatar asked May 25 '11 06:05

Vijey


1 Answers

Check out this Adobe livedoc, it clearly states:

  • mx.core.FlexGlobals.topLevelApplication: The top-level application object, regardless of where in the document tree your object executes. This object is of type spark.components.Application or mx.core.Application.

  • mx.core.UIComponent.parentDocument: The parent document of the current document. You can use parentDocument.parentDocument to walk up the tree of multiple documents.

  • mx.core.UIComponent.parentApplication: The Application object in which the current object exists. Applications can load other applications, therefore, you can access the immediate parent application by using this property. You can use parentApplication.parentApplication to walk up the tree of multiple applications.

Cheers

like image 106
Dennis Jaamann Avatar answered Oct 31 '22 09:10

Dennis Jaamann