This class manages the actions that should be taken when the Roku app starts. It extends the mc.CommandSequence
class.
isIncludingView
(boolean): Set this tofalse
to exclude certain commands. Default value istrue
.styleUrl
(string): The location of the styles file. The default value is"pkg:" + "/meta/Styles.json"
.maestroStyleUrl
(string): The location of the Maestro styles file. The default value is"pkg:/meta/maestroDefaultStyles.json"
This method creates the commands that will be executed when the app starts. The commands are stored in a linked list structure, with each command pointing to the next command in the sequence. The commands that are created are:
Init IOC
: Calls theinitializeIOC
method.Create FontManger
: Calls thecreateFontManger
method.Load Styles
: Calls theloadStyles
method.Setup Maestro
: Calls thesetupMaestro
method.Initialize ComponentPool
: Calls theinitializeComponentPool
method.Prebake Cells
: Calls the_prebakeViews
method.- Any additional custom steps specified by the
getCustomSteps
method.
This method provides an override point to add custom steps to the list of commands. It returns an empty array by default.
This method initializes the focus manager and creates a timer node.
Argument Name | Type | Default Value | Description |
---|---|---|---|
command |
mc.Command |
N/A | A command object that is passed to the method. |
None.
This method creates an IOC container and loads the manifest file. It also creates a delayedTaskManager
node.
Argument Name | Type | Default Value | Description |
---|---|---|---|
command |
mc.Command |
N/A | A command object that is passed to the method. |
None.
This method is called when a command in the sequence fails. It logs an error message and displays an error dialog.
Argument Name | Type | Default Value | Description |
---|---|---|---|
command |
mc.Command |
N/A | The command that has failed. |
message |
string |
N/A | The error message to be displayed. |
None.
This method displays an error dialog with a given title and message.
Argument Name | Type | Default Value | Description |
---|---|---|---|
title |
string |
N/A | The title of the error dialog. |
message |
string |
N/A | The message to be displayed in the error dialog. |
mc.types.node
: TheDialog
node that was created.
buttonSelected
: This event is triggered when a button in the dialog is selected.wasClosed
: This event is triggered when the dialog is closed.
initializeComponentPool
: This method creates two nodes, acomponentPool
node and acellTracker
node. It also sets these nodes as instance variables and adds them as fields to theglobal
object.createFontManger
: This method creates afontManager
object and sets it as an instance variable. It also adds thefontManager
object as a field to theglobal
object.loadStyles
: This method creates astyleManager
object and sets it as an instance variable. It also adds thestyleManager
object as a field to theglobal
object. It then loads the Maestro default styles and the app's styles from JSON files and adds them to thestyleManager
. It logs the version of the style that is being used.