Besides
main(), I remember there was
another program entry point - but i always have difficulty finding it. And I just found out why - there is a whole section from the legacy PDFs that is not in the online docs, "2.5 Entry Points" from "Component Reference" PDF.
I can only guess it got lost in translation. Reproducing it here for posterity:
2.5 Entry Points
In addition to the Main() BrightScript application entry point, firmware version 2.6 has added two additional entry points. RunUserInterface() is synonymous with Main() as a place for your application to start. RunScreenSaver() is a method that will be called when your script is registered as the system screen saver and the system has been idle and starts the screen saver.
Sub RunUserInterface(Void)
Sub RunUserInterface(aa as Object)
- Default script entry point for Roku applications.
- Can take a roAssociativeArray that can be passed via the Network Control API
Sub Main(Void)
- If there is no RunUserInterface() in the application, the method Main() will be called as the entry point for the application.
Sub RunScreenSaver(Void)
- Entered when the Roku has hit the configured idle-time. The screensaver to launch is selected by the user on the Screensaver settings page.
- The Roku box may not start the custom screensaver and will use a default screensaver instead if there is insufficient memory to start a screensaver slideshow
- roVideoPlayer and roAudioPlayer are not allowed to be run in a screensaver
- If you have any dialogs with ShowBusyAnimation() enabled, you’ll want to make sure you close and kill the reference before painting a new screen on top of them. Otherwise, your app may lose focus when returning from the screensaver.
Sub RunScreenSaverSettings(Void)
- Entered when the user selects “custom settings” on the Screensaver settings page and the application is configured as the system screensaver.
Can we please have the omission added to the docs? So that it is searchable and findable.
Pretty please... with
ZuckerBerg on top?