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

roGridScreen SetupLists Limit on Old Rokus?

I can't find any information about this in the SDK documentation or on the forums here, does anyone know if there is a 10 list limit within roGridScreen for older Rokus?

The channel has 14 lists, loads fine on a Roku 3 device but throws a "Member function not found in BrightScript Component or interface. (runtime error &hf4)" error when loading the channel on a Roku XD.

I started limiting the lists it could load and it works great at 10 lists, but 11 breaks it again. (tried different lists as well in case there was a corruption within the 11th list I was loading – didn't work).

Anyone else run across this? Is this a limitation?

Thanks,
0 Kudos
6 REPLIES 6
TheEndless
Channel Surfer

Re: roGridScreen SetupLists Limit on Old Rokus?

There's definitely no such limit on any Roku model. I have numerous channels with more than 10 rows on the grid screen (some with >100). Even if there were, the error wouldn't be "Member function not found in BrightScript Component or interface." That would suggest that you're trying to use a method that wasn't available on the 3.1 firmware. The error should include both a line number and the actual line that's causing the error. Are you able to share those?
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
crcmarketing
Visitor

Re: roGridScreen SetupLists Limit on Old Rokus?

Yeah, the line causing the error is this:

if content = invalid or content.count() = 0

I actually just told it to load the 10th list for 11, 12, 13 and 14 and it worked fine. So you're right no such limit.

So there's something not good in either my 11th or 12th list OR there's a memory issue with having too many videos?? Still trying to troubleshoot.

EDIT: Actually, I think it's something in last lists that I'm loading in causing the problem, I just loaded a 14 lists with 53 videos each and had no problem. Going to start troubleshooting from my content perspective unless someone can see something obviously dumb that I'm missing.


To give you a bit more, here's a sample of the code:

Sub showGridScreen(playlists, leftBread, rightBread)
port = CreateObject("roMessagePort")
screen = CreateObject("roGridScreen")
screen.SetMessagePort(port)
screen.SetGridStyle("flat-16x9")
screen.SetupLists(playlists.count()) ' populate the # of grid rows
playlistTitles = [] ' empty array of playlist titles
content = []

bc = NWM_Brightcove(m.brightcoveToken)

For i=0 To playlists.count()-1
content.Push(bc.GetEpisodesForPlaylist(playlists[i].playlistID))

if content[i] = invalid or content[i].count() = 0
ShowConnectionFailed()
return
end if

playlistTitles.push(playlists[i].shortdescriptionline1)
screen.SetContentList(i, content[i]) ' an array of content-meta-data
screen.SetListOffset(i,0) ' seems that grid format always starts user 3rd video over, correct this for every playlist
End For
0 Kudos
Komag
Roku Guru

Re: roGridScreen SetupLists Limit on Old Rokus?

Perhaps that "content" is an associative array, which if you try to to .count() won't work on older Rokus and give that exact error (I believe). When it crashes it also gives you the variables, and you should be able to see what i currently is.
0 Kudos
crcmarketing
Visitor

Re: roGridScreen SetupLists Limit on Old Rokus?

You're right, it is an associative array. Removing that line to check actually fixed the issue, but those particular lists now aren't loading any videos (list and its title is there, but every video is blank). I'm seeing videos in lists 1 through 10 but 11 through 14 aren't loading the videos…

Now I'm not sure what to do … I didn't realize that older Roku's would have an issue with associative arrays.

I can load those last lists of videos if they are the only ones, but not when I'm loading all the other lists of videos.

I'll try messing around with passing the lists in another way I guess, if I can.

Always open to suggestions too if there's a "best practice" sort of thing out there.

Thanks for the insight guys!
0 Kudos
TheEndless
Channel Surfer

Re: roGridScreen SetupLists Limit on Old Rokus?

Instead of content.count() = 0, you can (and should?) use content.IsEmpty(). That works on old and new Rokus. It's only the .Count() method that wasn't added until 6.x for associative arrays. There's no other issue with associative array support on legacy boxes, so it definitely sounds like something else is going on.

It's also worth reminding/pointing out that the old Legacy Rokus where this is an issue are officially no longer supported. If you're planning on publishing this channel as public, then you won't need to bother with legacy support, as you won't be able to publish to those devices anymore, anyway.
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
crcmarketing
Visitor

Re: roGridScreen SetupLists Limit on Old Rokus?

Wasn't aware of .IsEmpty(), thank you, will try that.

And yes, the legacy box issue I'm having sounds like something else is going on to me as well … I'll likely need to step through the content in the arrays and figure out if I have something not getting set in my arrays of content properly … I'll work on that Monday I suppose.

As far as the legacy support goes, I am definitely keeping that in mind.

Thank you
0 Kudos