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: 
shadowing
Level 7

Multiple GridScreens

I've been futzing around a bit with the GridScreen, but I realized that there is a problem with having multiple GridScreens (i.e. going from one GridScreen to another). I've tried to fix this by closing a GridScreen before moving on to another GridScreen and re-creating / re-opening the GridScreen after the second GridScreen closes. However, I've noticed that the initial GridScreen is 'glitched' with the second GridScreen. Is there any way to refresh the relevant portions or fix this?
0 Kudos
6 Replies
TheEndless
Level 9

Re: Multiple GridScreens

Try adding a Sleep(500) after closing the topmost grid screen. You can play with the duration of the sleep, but I find 500 works pretty well.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
shadowing
Level 7

Re: Multiple GridScreens

You, sir, should get an Internet cookie. It worked! Thanks a lot!
0 Kudos
KentL
Level 7

Re: Multiple GridScreens

I'm having the same issue. From one gridscreen, I open a second gridscreen. When I press the "back" button on the remote, the second gridscreen closes and I return to the first -- but the first no longer responds to remote button presses.

From where did you call the Sleep() function? I tried the following in the first gridscreen without success using 500 and 1000:


optionScreen = PreShowOptionsScreen()
ShowOptionsScreen(optionScreen)
Sleep(500)


I've also tried reloading the first gridscreen's data just after the Sleep, but that didn't help. I appreciate any thoughts, thanks!
0 Kudos
NewManLiving
Level 7

Re: Multiple GridScreens

You may still be in the top grid screen loop
Make sure you exit the loop In the isscreenclosed event
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
0 Kudos
Owlie
Level 7

Re: Multiple GridScreens

^ Exactly this ^

Make sure when you're closing the 2nd gridscreen you're 'exiting' the while loop. For example:


if msg.isScreenClosed()
Exit while
end if
0 Kudos
KentL
Level 7

Re: Multiple GridScreens

Wow, thanks for your help Owlie and NewManLiving - that was it!
0 Kudos