Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
mpwhitt
Level 7

Multiple button presses roGridScreen

I have a roGridScreen that leads to a roSpringboardScreen. If press the "OK" button multiple times (while on the grid screen), the springboard screen is shown, however, when I try to go back to the grid screen, the app immediately diverts back to the springboard screen as many times as I pressed the "OK" button. How can this behavior be avoided? Thanks.
0 Kudos
2 Replies
Roku Employee
Roku Employee

Re: Multiple button presses roGridScreen

Best is to launch the springboard immediately on keypress so the user doesn't feel like they are hitting "OK" and nothing is happening.

Beyond that, I think you can "drain" the message port:

while port.getmessage() ="roGridScreenEvent" 
end while


- Joel
0 Kudos
EnTerr
Level 8

Re: Multiple button presses roGridScreen

"RokuJoel" wrote:
Beyond that, I think you can "drain" the message port:
while port.getmessage() ="roGridScreenEvent" 
end while

Couple of bugs there - both with insidious potential, it seems to me:
while type(port.PeekMessage()) = "roGridScreenEvent":
port.GetMessage()
end while
0 Kudos