Forum Discussion

rado_ap's avatar
rado_ap
Visitor
9 years ago

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?

3 Replies

  • raptor's avatar
    raptor
    Binge Watcher
    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.
  • 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.
  • tvjay's avatar
    tvjay
    Channel Surfer
    "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.