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: 
krh5150
Visitor

PosterScreen SetFocusedListItem(val)

Hi,

I'm having an issue setting the focus of an item in an list for the poster screen, which uses the filter banner for seasons. Basically, I'm trying to set the season (filter banner) as the current season using poster.SetFocusedList(val)...with val being an integer. This is fine, the season gets set. However, when I then try to set the current episode (poster.SetFocusedListItem(val), it defaults to the third episode in the list, where I may want it to default to say the 6th episode in the list (i.e. poster.SetFocusedListItem(5). If I set it to 0, it works and sets it to the first episode.

For example, the following should be set to season 4, episode 5, however, it sets it to season 4 episode 3

poster.SetFocusedList(3)
poster.SetFocusedListItem(4)

The poster screen content list is an array object. Each index contains an array of episodes. Not sure if the data type is incorrect.

Thanks,
Kevin
0 Kudos
2 REPLIES 2
TheEndless
Channel Surfer

Re: PosterScreen SetFocusedListItem(val)

Typically, when changing filters, you'd be resetting the content list. Putting those two lines right next to each other will likely only work properly if you're not changing the content list again after changing the focused list/filter. Is it possible that you're initially setting the content list to a list with only 3 items, which would result in the third item being focused when you change the list to match the filter selection?
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
krh5150
Visitor

Re: PosterScreen SetFocusedListItem(val)

Thanks TheEndless...that did it!

Kevin
0 Kudos