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: 
YungBlood
Streaming Star

simplePoster problem

Hi...
I'm working from the simplePoster example, and I have a small graphical glitch that I don't see how to fix. All I've done to modify the example so far is change it 2 categories, with category dependent selections. The first category has one selection. The second has 2 selections. When I navigate to the second selection in the second category, press up, and go back to the first category, I end up on a blank second "selection". Is there an easy fix?
-Kevin


categoryList = [ "Short", "Long" ]



if (category = "Short") then
showList = [
{
ShortDescriptionLine1:"Mini",
ShortDescriptionLine2:"Short Shows",
}
]
else if (category = "Long") then
showList = [
{
ShortDescriptionLine1:"Long",
ShortDescriptionLine2:"Long Episodes",
HDPosterUrl:"pkg:/media/bogusFileName_hd.jpg",
SDPosterUrl:"pkg:/media/bogusFileName_hd.jpg"
}
{
ShortDescriptionLine1:"Epic",
ShortDescriptionLine2:"All-Day Shows",
HDPosterUrl:"pkg:/media/bogusFileName_hd.jpg",
SDPosterUrl:"pkg:/media/bogusFileName_hd.jpg"
}
]
end if
YungBlood

Bringing more fun to Roku!
0 Kudos
3 REPLIES 3
nowhereman
Visitor

Re: simplePoster problem

"YungBlood" wrote:
Hi...
I'm working from the simplePoster example, and I have a small graphical glitch that I don't see how to fix. All I've done to modify the example so far is change it 2 categories, with category dependent selections. The first category has one selection. The second has 2 selections. When I navigate to the second selection in the second category, press up, and go back to the first category, I end up on a blank second "selection". Is there an easy fix?


It's trying to keep the focus on the second item even though you're changing the screen content when the category changes. One option is to reset the selected item each time the user changes categories...


if msg.isListFocused() then
screen.SetFocusedListItem(0)
...
twitter:nowhereman
http://www.thenowhereman.com/roku
http://www.thenowhereman.com/netflix
0 Kudos
TheEndless
Channel Surfer

Re: simplePoster problem

In the wait loop "msg.isListFocused()" event, add "screen.SetFocusedListItem(0)" after the SetContentList line. That will reset the selection to the first poster in the list.

EDIT: nowhereman beat me to it...
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
YungBlood
Streaming Star

Re: simplePoster problem

TheEndless & NoWhereMan,
Thank you both! 🙂
-Kevin
YungBlood

Bringing more fun to Roku!
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.