开发者

parentApplication and FlexGlobals.topLevelApplication in Flex 4

开发者 https://www.devze.com 2023-03-08 01:06 出处:网络
In Flex 4, a开发者_Python百科re there any differences between parentApplication and FlexGlobals.topLevelApplication? Are referring to the same top level application?

In Flex 4, a开发者_Python百科re 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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消