Flex 4 中的parentApplication 和 FlexGlobals.topLevelApplication
在 Flex 4 中,parentApplication
和 FlexGlobals.topLevelApplication
之间有什么区别吗?是否指的是同一个顶级应用程序?
我认为两者是一样的;一个 (parentApplication
) 属于 Spark,另一个 (FlexGlobals.topLevelApplication
) 属于 Halo。我的理解正确吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看此 Adobe livedoc,它明确指出:
mx.core.FlexGlobals.topLevelApplication:顶级应用程序对象,无论您的对象在文档树中的哪个位置执行。该对象的类型为spark.components.Application 或mx.core.Application。
mx.core.UIComponent.parentDocument:当前文档的父文档。您可以使用parentDocument.parentDocument 遍历多个文档的树。
mx.core.UIComponent.parentApplication:当前对象所在的应用程序对象。应用程序可以加载其他应用程序,因此,您可以使用此属性访问直接父应用程序。您可以使用parentApplication.parentApplication 遍历多个应用程序的树。
干杯
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