DadOfTwo
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2018
07:40 AM
Setting roSGScene object on global
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:
This is being passed around the app by reference. Can you see anything wrong with this approach?
Thanks
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
5 REPLIES 5
DadOfTwo
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2018
03:43 AM
Re: Setting roSGScene object on global
Hi
Any devs with any views on adding getScene() to global scope?
Thanks
Any devs with any views on adding getScene() to global scope?
Thanks

squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2018
09:33 AM
Re: Setting roSGScene object on global
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
NB_
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2018
12:49 PM
Re: Setting roSGScene object on global
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())
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
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2018
12:54 AM
Re: Setting roSGScene object on global
Ok, thanks.
I like your mañana approach, squirreltown 😄
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:
I like your mañana approach, squirreltown 😄
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)
NB_
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2018
10:54 AM
Re: Setting roSGScene object on global
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!
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!