How to Access another file Label using a Brightscript?

前端 未结 1 752
刺人心
刺人心 2021-01-26 04:13

I\'m trying to simple navigation. And I tried more than one way to open another screen.

  1. Hide/show concept (But It\'s working only single File).
  2. Using View
1条回答
  •  [愿得一人]
    2021-01-26 04:40

    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

    0 讨论(0)
提交回复
热议问题