繁体   English   中英

来自 flex 的父 parentDocument 的等效项

[英]Equivalent of parent parentDocument from flex

我必须将 Flex 代码转换为 Apache Royale 代码,但在我的研究中,我没有找到等效的属性。

在 Flex 中,要从父 mxml 调用 actionScipt 函数,我有:

<mx:Button label="Login" click="parentDocument.myfunction()"/>

我在研究期间发现了 parentComponent,但我访问了可能未定义的属性 parentComponent错误。

我也尝试过'parent',错误变成了Call to a possible undefined method verif_sharedobject through a reference with static type IParent。

我对 IParent、Container 和 Group(来自 Jewel)做了一些研究,但目前我没有成功

请检查Core库中的ParentDocumentBead珠。

来自 asdoc :

     *  The ParentDocumentBead class looks up the parent
     *  chain to find a parent that was written in MXML.
     *  Because it is usually rare for an application
     *  to need to know this information, an optional bead
     *  is used to compute it, instead of baking in the
     *  overhead of a recursive infrastucture to store
     *  this information.  It is intended to be used
     *  as a bead in the top-level tag of an MXML document.

HTH

暂无
暂无

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

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