Channel exiting early

I have a channel that has a configuration screen that opens the first time you go into the application, and it works fine, the problem is the channel exits after I leave the configuration screen. I’ve read through the docs and not found this behavior, but I am guessing it is because I have closed the last open screen even though I have subsequent code to execute. Does the Roku automatically exit a channel as soon as no screen is showing? Moving my code for the config to happen after another screen is opened will take a lot of work, so I want to make sure that is the problem before I do it. I don’t get any errors in the telnet window.

Yes. As soon as the last screen is closed, the channel will exit. You’ll need a facade screen to prevent the channel from exiting before you want it to. See RokuKevin’s post here: viewtopic.php?f=34&t=26350&p=162550#p162550

The need for a facade is also mentioned in the Developer Guide: http://sdkdocs.roku.com/display/RokuSDK … kuPlatform

Thanks for the feedback, guess it’s back to the code window I go.

“SkipFire” wrote:
Thanks for the feedback, guess it’s back to the code window I go.
You literally just need to add three lines of code to your RunUserInterface()/Main() function, and you should be good to go…

Sub RunUserInterface()
    InitTheme()
    facade = CreateObject("roPosterScreen")
    facade.Show()

    ' All of your current code

    facade.Close()
End Sub

Nifty, I’ll give that a try.

That facade trick worked beautifully, thanks.