簡體   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