I’m trying to integrate Monarch and I’m just not understanding how to just get a simple screen to appear.
ERROR:SCRIPT: /monarch/monarch.lua:655: There is no screen registered with id hash: [cards]
I know it has something to do with this…
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:
function init(self)
msg.post("#", "show_first_screen")
end
function on_message(self, message_id, message, sender)
monarch.show(hash("first_screen"))
end
But I’m not sure how to interpret that code and need in my own project since the example for filling out the dialogs for the screen_proxy script doesn’t match these items –