diff --git a/README.md b/README.md index 090503b..7cd5f30 100644 --- a/README.md +++ b/README.md @@ -77,12 +77,12 @@ The navigation in Monarch is based around a stack of screens. When a screen is s ### Showing a new screen You show a screen in one of two ways: -1. Post a ```show``` message to the ```screen.script``` +1. Post a ```show``` message to the screen script (either `screen_proxy.script` or `screen_factory.script`) 2. Call ```monarch.show()``` (see below) Showing a screen will push it to the top of the stack and trigger an optional transition. The previous screen will be hidden (with an optional transition) unless the screen to be shown is a [popup](#popups). -NOTE: You must ensure that the ```init()``` function of the ```screen.script``` has run. The ```init()``` function is responsible for registering the screen and it's not possible to show it until this has happened. A good practice is to delay the first call by posting a message to a controller script or similar before calling ```monarch.show()``` the first time: +NOTE: You must ensure that the ```init()``` function of the screen script (either `screen_proxy.script` or `screen_factory.script`) has run. The ```init()``` function is responsible for registering the screen and it's not possible to show it until this has happened. A good practice is to delay the first call by posting a message to a controller script or similar before calling ```monarch.show()``` the first time: function init(self) msg.post("#", "show_first_screen") @@ -117,7 +117,7 @@ Monarch can also show a screen without adding it to the stack. This can be used ### Going back to a previous screen You navigate back in the screen hierarchy in one of two ways: -1. Post a ```back``` message to the ```screen.script``` +1. Post a ```back``` message to the screen script (either `screen_proxy.script` or `screen_factory.script`) 2. Call ```monarch.back()``` (see below) @@ -305,7 +305,7 @@ Both the ```monarch.show()``` and ```monarch.back()``` functions take an optiona ## Monarch API ### monarch.show(screen_id, [options], [data], [callback]) -Show a Monarch screen. Note that the screen must be registered before it can be shown. The ```init()``` function of the ```screen.script``` takes care of registration. This operation will be added to the queue if Monarch is busy. +Show a Monarch screen. Note that the screen must be registered before it can be shown. The ```init()``` function of the screen script (either `screen_proxy.script` or `screen_factory.script`) takes care of registration. This operation will be added to the queue if Monarch is busy. **PARAMETERS** * ```screen_id``` (string|hash) - Id of the screen to show.