Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mpwhitt
Visitor

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 2
RokuJoel
Binge Watcher

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
Roku Guru

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
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.