"EnTerr" wrote:
"RokuJoel" wrote:
... if you don't already have a screen open when you call your registration function, when the registration screen closes the channel will exit, although, sometimes, if you can open a new screen immediately afterwards you can prevent that.
Huh, interesting - i was wondering when channel exits and after some experimenting seems that the criteria is that
either BS code exits (RETURN or END)
OR when the last open screen CLOSES
This explains why a script is able to run initially when there is nothing on screen - the screen stack might be empty but that does not get checked until window closing occurs - and when that happens if stack is empty, execution ends in a hurry.
The trick with showing screen right after closing previous does not seem to work reliably; for example there is not enough time to createobject() and then show() it - it has to be ready and waiting, i suspect this is more of a bug than a feature
Per RokuKevin, from two years ago, the need for a "facade" screen is "well documented" (
viewtopic.php?f=34&t=26350&p=162550#p162550). While I'd debate the use of the word "well" in that sentence, since I can only find a single reference to it in the SDK documentation, and that reference only suggests it as a way to prevent "screen flicker", Roku seems to consider it a feature rather than a bug.
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)