How to Access another file Label using a Brightscript?

只愿长相守 提交于 2019-12-02 07:37:13

I used your code, I was able to make it work, however, I made some adjustments.

I think your issue with the code just as you have it right now, is a "scope" issue, let me explain a little bit.

You are trying to call "m.top.ComponentController" within you panelset.brs file but "ComponentController" is not a field on the panelset component, in that scope you can only access the fields on the panelset interface.

So you have two options:

1 - On your panelSet.brs instead of calling "m.top.ComponentController" change it for "m.top.getScene().ComponentController".

2 - Create a field within your on your wisePanel.xml, add a listener to that field where you create the WisePanel component, in that scope, you'll be able to m.top.componentController.

Note: I used the setup_and_helloworld link example of the Roku Dev with your files.

Doc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!