简体   繁体   English

Flex 4 中的 parentApplication 和 FlexGlobals.topLevelApplication

[英]parentApplication and FlexGlobals.topLevelApplication in Flex 4

In Flex 4, are there any differences between parentApplication and FlexGlobals.topLevelApplication ?在 Flex 4 中, parentApplicationFlexGlobals.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.一个( parentApplication )属于 Spark,另一个( FlexGlobals.topLevelApplication )属于 Halo。 Is my understanding correct?我的理解正确吗?

Check out this Adobe livedoc , it clearly states:看看这个 Adobe livedoc ,它清楚地指出:

  • mx.core.FlexGlobals.topLevelApplication: The top-level application object, regardless of where in the document tree your object executes. mx.core.FlexGlobals.topLevelApplication:顶级应用程序 object,无论 object 在文档树的哪个位置执行。 This object is of type spark.components.Application or mx.core.Application.此 object 的类型为 spark.components.Application 或 mx.core.Application。

  • mx.core.UIComponent.parentDocument: The parent document of the current document. mx.core.UIComponent.parentDocument:当前文档的父文档。 You can use parentDocument.parentDocument to walk up the tree of multiple documents.您可以使用 parentDocument.parentDocument 向上遍历多个文档的树。

  • mx.core.UIComponent.parentApplication: The Application object in which the current object exists. mx.core.UIComponent.parentApplication:当前 object 所在的应用程序 object。 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.您可以使用 parentApplication.parentApplication 向上遍历多个应用程序的树。

Cheers干杯

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM