Your Digital Media Has Never Looked So Good

 
Taurian
Topic Author
Posts: 2
Joined: Thu Aug 02, 2018 11:11 pm

Calling a function from main.brs

Thu Aug 02, 2018 11:16 pm

Hi, I have a dumb question. I'm trying to call a function from main.brs, getting the usual error about it unable to see it.


//main.brs
scene = screen.CreateScene("HomeScene") //Function is located in the "HomeScene.brs, not the .xml"
scene.myfunction() <-- Error


Thanks,

-T
 
joetesta
Posts: 762
Joined: Wed Apr 20, 2011 11:48 am

Re: Calling a function from main.brs

Fri Aug 03, 2018 7:11 am

did you try this?
https://sdkdocs.roku.com/display/sdkdoc/interface

Add to your HomeScene xml:
<interface>
   <function name="myfunction" />
</interface>


Does it work from scene?
aspiring
 
Taurian
Topic Author
Posts: 2
Joined: Thu Aug 02, 2018 11:11 pm

Re: Calling a function from main.brs

Fri Aug 03, 2018 8:36 am

No, but that did lead me to this:
https://sdkdocs.roku.com/display/sdkdoc ... onalFields

and this:
scene.callFunc("myfunction")

Thanks.

Who is online

Users browsing this forum: No registered users and 10 guests