Your Digital Media Has Never Looked So Good

 
DadOfTwo
Topic Author
Posts: 30
Joined: Thu Feb 02, 2017 8:11 am
Contact:

Setting roSGScene object on global

Mon Sep 24, 2018 7:40 am

OK bear with me.

We're working on a legacy Roku box the Sky Now TV whitebox (based on the Roku LT) which is no longer supported, it's pinned at Roku Firmware 7.5.3. No more Roku OS updates due.

We're working thru the edge cases (runtimes) from our app that's targeting 8.1 OS. One is we're not able to access the m._main.getScene() Object from app/source Scope.

One way around this is to set the roSGScene object on global from main.brs:
globalAA = screen.getGlobalNode() 
globalAA.addFields({ sceneAA: screen.getScene() })


This is being passed around the app by reference. Can you see anything wrong with this approach?


Thanks
 
DadOfTwo
Topic Author
Posts: 30
Joined: Thu Feb 02, 2017 8:11 am
Contact:

Re: Setting roSGScene object on global

Fri Sep 28, 2018 3:43 am

Hi

Any devs with any views on adding getScene() to global scope?

Thanks
 
User avatar
squirreltown
Posts: 824
Joined: Sun Apr 21, 2013 2:20 pm

Re: Setting roSGScene object on global

Fri Sep 28, 2018 9:33 am

I'm assuming that this works in your channel right now and you are asking about the future. SceneGraph is relatively new, so there's that, but Roku is pretty slow to remove things from the firmware. You're always at their mercy anyway, so if it was me I'd go with it and worry about it when it breaks. Who knows? There might be another solution when that day comes.
Kinetics Screensavers
 
User avatar
RokuNB
Posts: 433
Joined: Fri Mar 31, 2017 2:22 pm

Re: Setting roSGScene object on global

Fri Sep 28, 2018 12:49 pm

I don't see it wrong doing the above.

Albeit don't see it being necessary either - assuming you are using only one scene, you can always get that by calling m.top.getScene() from any thread (and in the main() thread can do that with screen.getScene())
 
DadOfTwo
Topic Author
Posts: 30
Joined: Thu Feb 02, 2017 8:11 am
Contact:

Re: Setting roSGScene object on global

Tue Oct 02, 2018 12:54 am

Ok, thanks.

I like your mañana approach, squirreltown :D

This is a work around for 7.5.3 firmware, RokuNB. m.top doesn't exist when we need it in the main thread and in the render thread it's returning:

Brightscript Debugger> ?m.top.getScene()

Member function not found in BrightScript Component or interface. (runtime error &hf4) in $LIVECOMPILE(64)
 
User avatar
RokuNB
Posts: 433
Joined: Fri Mar 31, 2017 2:22 pm

Re: Setting roSGScene object on global

Fri Oct 05, 2018 10:54 am

true that, getScene() says added in 7.6
https://sdkdocs.roku.com/display/sdkdoc ... -getScene()asroSGNode
if stuck at old FW version - by all means, do what you have to do to make it work!

Who is online

Users browsing this forum: No registered users and 3 guests