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: 
rado_ap
Visitor

Can't start a new scene

Hello, I just started developing for Roku. I'm using Scene Graph and I managed to do a simple registration screen. Now I want to show a second scene from the first one. I figured out that I can't do this on render thread, so what I'm doing is: 


m.testTask = CreateObject("roSGNode", "CreateScreen")
m.testTask.control = "RUN"

and in the xml of the this task node:

screen = CreateObject("roSGScreen") 
m.port = CreateObject("roMessagePort")    
screen.setMessagePort(m.port)
scene = screen.CreateScene("SecondScene")
screen.show()


The second scene is defined in its own xml file. Sadly when executed, the app crashes with "Execution timeout (runtime error &h23)" at the line of screen.show()

Can anyone point what am I doing wrong please?
0 Kudos
3 REPLIES 3
raptor
Binge Watcher

Re: Can't start a new scene

I started to learn the RSG API a few months ago and just completed my app migration, but I won't claim to be an expert.  Having said that, I think your problem is that you are trying to do rendering things in a task node.  That's not what task nodes are for.  Also, you probably don't want to create a second scene anyway.  If you are thinking you want multiple "screens" of information then you probably want a PanelSet to which you add Panels for each new "screen" you want to display.  PanelSet is a great concept from a UI perspective.  If you think this isn't relevant to your situation then say a little more about what your actual desired flow (user experience) looks like.
0 Kudos
SECHIN_SUNNY
Visitor

Re: Can't start a new scene

you made  a scene node within the main , now you would execute it within components . Now to move top another screen you should make children nodes within the scene , and set up a condition , like when the username and password is validated you will make the other screen visible true and setfocus true and set the last screens visiblity as false and setfocus false.
Thanks
Regards
Sechin Sunny
0 Kudos
tvjay
Channel Surfer

Re: Can't start a new scene

"SECHIN SUNNY" wrote:
you made  a scene node within the main , now you would execute it within components . Now to move top another screen you should make children nodes within the scene , and set up a condition , like when the username and password is validated you will make the other screen visible true and setfocus true and set the last screens visiblity as false and setfocus false.

Can you expand on this or do you have some examples? I am having the exact same problem.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.