If I create a screen object and add a scene to it, how do I have that component pop the screen off the stack without having the screen in scope? I believe I just need to call screen.close(), but I don't have access to screen (from what I can tell) inside my component.
sub Main()
screen = ...
scene = ...
screen.setScene(scene)
... wait for screen-close event
end sub
' in component
...
<script>
function onKeyEvent(key as String, press as Boolean) as Boolean
...
' how can I pop this screen on a certain press?
' how can I tell the screen's port it needs to do something like add another screen on top of the current one?
end function
</script>
At this point the scene component is handling key events, but how can I pop the screen from inside my component? Is there a getScreen function accessible from the function? Do I have to pass the screen in? How does the scene component communicate with outside of its scope to do things like popping the current screen or saying "X" screen needs to be put up over it. I see I can set field observers that the component can listen to, but how does the communication happen the other way? Can I send events to the screen's port?