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

Empty Feed - Stuck at Retrieving

Hi -
I have a sub that handles certain empty feeds and uses roMessageDialog to tell the user that the feed is empty. After that, I wasn't sure how to properly send them back, so I had just started at the beginning again with
  screen=preShowHomeScreen("Blah", "")
showHomeScreen(screen)


But now I noticed that if the user clicks 'up' from that point, they are at the 'Retrieving' screen from the previous empty feed and they need to hit up again.

So I am trying to correct this, I tried
  screen.close()
screen=preShowHomeScreen("Blah", "")
showHomeScreen(screen)

But then nothing happens at all when the user hits 'OK' the roMessageDialog doesn't go away.
I tried a few other variations of "return" but the 'Retrieving' screen is all I can get that way.

Now I see that my roMessageDialog is called from within
screen.SetContentList(getShowsForCategoryItem(category, m.curCategory))
so that's why the screen.close doesn't work... looks like this will take some serious hacking to change to do what I want... maybe I should just live with it.

Can anyone point me in the right direction for how to handle this?
tyvmia
aspiring
0 Kudos
1 REPLY 1
joetesta
Roku Guru

Re: Empty Feed - Stuck at Retrieving

OK I got it, wasn't that hard actually.
new code in appPosterScreen.brs:
    shows = getShowsForCategoryItem(category, m.curCategory)
print "loaded feed has this many: "; shows.Count()
if shows.Count() = 0 return -1
screen.SetContentList(shows)
aspiring
0 Kudos