Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
squirreltown
Level 9

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
Kinetics Screensavers
0 Kudos
3 REPLIES 3\
EnTerr
Level 11

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):
    clock = createObject("roTimespan")
clock.mark()
while clock.totalMilliseconds() < 100
port.getMessage()
end while


It sounds like a bug though.
0 Kudos
squirreltown
Level 9

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
0 Kudos
squirreltown
Level 9

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
0 Kudos