
squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2014
09:20 AM
2dAPI / inputcontrols
Channel is all 2d custom screens. Have a comment screen to type a comment and email. I am using the channel store "get partial info" to grab the users name and email (share/don't share). The thing is that the remote commands used on the channel store canvas - in this case "up" to select share and "OK" are being executed again once the channel store screen closes and the comment screen opens, changing the focus from where i want it. The channel store and comment screen roUniversalControlEvent are on different ports so i don't see how this is happening. Anything to do about this?
thanks
thanks
Kinetics Screensavers
3 REPLIES 3
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2014
12:20 PM
Re: 2dAPI / inputcontrols
How strange. I imagine you can run a dry loop to flush all events before the main loop of the comments screen? Something like "while port.getMessage() <> invalid: end while". Or even keep flushing for certain amount of time (typed but not tested):
It sounds like a bug though.
clock = createObject("roTimespan")
clock.mark()
while clock.totalMilliseconds() < 100
port.getMessage()
end while
It sounds like a bug though.

squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2014
12:27 PM
Re: 2dAPI / inputcontrols
Thanks EnTerr, I'll try something like that and see how it goes. I thought crossing wires on separate ports would be impossible.
Kinetics Screensavers

squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2014
02:25 PM
Re: 2dAPI / inputcontrols
Enterr thanks for the tip, I got rid of the two offending keypresses here, and handled when the store isnt used. Still strange, would like to hear from a RokuEngineer whats up with this
clock = createObject("roTimespan")
clock.mark()
while clock.totalMilliseconds() < 500
msg = msgport.getmessage()
if type(msg) = "roUniversalControlEvent"
while clock.totalMilliseconds() < 500
msg = msgport.getmessage()
if type(msg) = "roUniversalControlEvent"
exit while
end if
end while
exit while
end if
end while
Kinetics Screensavers