Solved
Forum Discussion
sanity-check
3 years agoRoku Guru
In main.brs you've nested your check for roSGNodeEvent inside your check for roSGScreenEvent, so you'll never hit it.
if msgType = "roSGScreenEvent" then if msg.isScreenClosed() then return else if msgType = "roSGNodeEvent" then field = msg.getField() ? "field = " + field if field = "exitApp" then ? "exitApp" return end if end if end if
It looks like it should work, apart from that - though I'd maybe check 'msg.getData() = true' as well just to protect me from my future idiot self.
360tv
3 years agoStreaming Star
while(true)
? m.port
msg = wait(0, m.port)
? msg
? "Msg Type = " + type(msg)
msgType = type(msg)
if msgType = "roSGScreenEvent" then
if msg.isScreenClosed() then
return
end if
else if msgType = "roSGNodeEvent" then
field = msg.getField()
? "field = " + field
if field = "exitApp" then
? "exitApp"
return
end if
end if
end while
`? msg` should print whatever's there, reguardless, but it never prints anything. exitapp is defined as shown in my firstpost.
- 360tv3 years agoStreaming Star`scene.setFocus(true)` was missing from main.brs.
- sanity-check3 years agoRoku Guru
Interesting, OK!
I'm glad you've got it working, but scene.setfocus is not something I've had to do... You may have some other focus related issue which shows itself in a different way in the near future, so keep an eye out.