Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gboudreau
Channel Surfer

roRegistrySection: class PLUGIN|MARKUP on thread RENDER

My code fails to create a roRegistrySection object. I tried on the debug console too, and it fails with the same error:
BrightScript Debugger> sec = CreateObject("roRegistrySection", "Authentication")
BRIGHTSCRIPT: ERROR: roRegistrySection: class PLUGIN|MARKUP on thread RENDER

Do I need to create roRegistrySection objects somehow differently?
0 Kudos
10 REPLIES 10
belltown
Roku Guru

Re: roRegistrySection: class PLUGIN|MARKUP on thread RENDER

Where are you doing that? If it's in a Scene Graph script, then it can only be used in a Task node.
0 Kudos
gboudreau
Channel Surfer

Re: roRegistrySection: class PLUGIN|MARKUP on thread RENDER

It's called from within the Init() function of a Graph XML component, so I guess that is what you meant.
I'll check what Task nodes are.

Thanks.
0 Kudos
TheEndless
Channel Surfer

Re: roRegistrySection: class PLUGIN|MARKUP on thread RENDER

This is a decent reference for what standard BrightScript components can be used with SceneGraph and in which threads/components: https://sdkdocs.roku.com/display/sdkdoc ... pt+Support
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
gboudreau
Channel Surfer

Re: roRegistrySection: class PLUGIN|MARKUP on thread RENDER

Thanks.
I was able to create a custom Task XML that allowed me to read the registry from my scene, but later moved most of that code into the main.brs, so I didn't need it anymore!
I hit a similar problem with the roCodeRegistrationScreen; I was trying to use it in my scene too, but I guess you can't do that, so I moved that code into main.brs, and it worked.

Thanks again for the Task pointer.
0 Kudos
EnTerr
Roku Guru

Re: roRegistrySection: class PLUGIN|MARKUP on thread RENDER

"gboudreau" wrote:
I hit a similar problem with the roCodeRegistrationScreen; I was trying to use it in my scene too, but I guess you can't do that, so I moved that code into main.brs, and it worked.

roCodeRegistrationScreen is a non-(ob)scene component.
Do read the page theEndless linked to above, it says it.

Suppose we can come with some heuristic, like: if it's UI component and starts with "ro" (but not "roSG") - it can't be used in the render/SG UI thread.
0 Kudos
gboudreau
Channel Surfer

Re: roRegistrySection: class PLUGIN|MARKUP on thread RENDER

Yeah, I had read it, but I was confused... How can I show a screen from a scene..?
For example, my scene shows a grid, and the user selects one of the content node in the grid, and I want to start a slideshow (which is a screen, same as roCodeRegistrationScreen). How can my scene, which has the observer on PosterGrid.itemSelected, start the slideshow screen ?
0 Kudos
EnTerr
Roku Guru

Re: roRegistrySection: class PLUGIN|MARKUP on thread RENDER

Can't.
You are not supposed to use roSlideShow (et al "ro" components) once seduced by the darker xml side.

By using roSGScreen
"Morpheus" wrote:
You take the red pill - you stay in Wonderland, and I show you how deep the rabbit hole goes.
Remember: all I'm offering is the truth. Nothing more.

sdkdocs.roku.com describes two different SDKs, which are immiscible like oil and water. Generally speaking. There might be exceptions - just like emulsion can be whipped between oil and water and get good things out of it, like mayo, hollandaise sauce or body lotion. But as a rule they separate.
0 Kudos
gboudreau
Channel Surfer

Re: roRegistrySection: class PLUGIN|MARKUP on thread RENDER

"EnTerr" wrote:
sdkdocs.roku.com describes two different SDKs, which are immiscible like oil and water.

What would those be? BrightScript Components and Scene Graph?

So you mean that since I'm using SG, I should NOT use roSlideShow, roCodeRegistrationScreen and other components defined as a "Brightscript Components"
https://sdkdocs.roku.com/display/sdkdoc/Components ? I need to re-write those components myself?

Did I somehow skip an important page to read, regarding development on Roku? I seem to be missing basic concepts...
0 Kudos
EnTerr
Roku Guru

Re: roRegistrySection: class PLUGIN|MARKUP on thread RENDER

"gboudreau" wrote:
Did I somehow skip an important page to read, regarding development on Roku? I seem to be missing basic concepts...

Ha! I wish it was as simple. And your humility is appreciated 8-)

No, it's just you have to acquire that knowledge face-planting a few times in Roku world. I have been around things-Roku for like what, 5 years? So i was reading the APIs since the time they were bound in PDF files and have long-term observations over their evolution.

The SG was newly hatched to the public last year and an attempt at "SDK 2.0" pivot - but the documentation was edited in place as if SG is coherent with everything else existing before, which it isn't. Whoever is writing that "couldn't see the forest for the trees" - likely for being too close so unable to see the big picture.
0 Kudos