0

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

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

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

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

我也尝试了'parent',错误变成了通过静态类型IParent的引用调用可能未定义的方法verif_sharedobject。

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

4

1 回答 1

0

请检查图书馆的ParentDocumentBead珠子。Core

从 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.

高温高压

于 2020-11-17T17:41:56.320 回答