ParentApplication and FlexGlobals.topLevelApplication in Flex 4

In Flex 4, are there differences between parentApplication and FlexGlobals.topLevelApplication ? Do they have links to the same top-level application?

I think both are the same; one ( parentApplication ) belongs to Spark, and the other ( FlexGlobals.topLevelApplication ) belongs to Halo. Do I understand correctly?

+7
source share
1 answer

Give up on this Adobe liveoc , it clearly states:

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

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

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

Greetings

+8
source

All Articles