[英]In flex 4.5 parentDocument did not working as in flex 4.0. How to call parentDocument in flex 4.5?
[英]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.