I am using a combination of GridScreen and VideoScreen examples from the SDK. My goal is to make a GridScreen populated from XML which is hosted on my server. I am populating the List Names properly, but cannot figure out for the life of me how to populate the list of content in the rowIndex (setContentList function). Here are all the relevant code snippets I am using:
XML -
EDIT: READ BELOW POST TO SEE SOLUTION!!!(for now just using a very slightly modified sample feed XML from the SDK. Once I have this working I will make custom XML with my own content)
Relevant part of my appGridScreen.brs. Once again, I am getting the List Names, but cannot populate the contents.
Function showGridScreen(screen As Object, gridstyle as string) As string
print "enter showGridScreen"
conn = InitCategoryFeedConnection()
m.Categories = conn.LoadCategoryFeed(conn)
m.CategoryNames = conn.GetCategoryNames(m.Categories)
categoryList = conn.GetCategoryNames(m.Categories)
screen.setupLists(categoryList.count())
screen.SetListNames(categoryList)
initCategoryList()
for i = 0 to categoryList.count()-1
screen.SetContentList(i, getShowsForCategoryItem(m.CategoryNames))
end for
screen.Show()
The problem part is the last for loop. I am just not sure what the heck to pass to the getShowsForCategoryItem function, which currently looks like this:
Function getShowsForCategoryItem(category As Object) As Object
print "getting shows for category "; category
conn = InitShowFeedConnection(category.kids)
showList = conn.LoadShowFeed(conn)
return showList
End Function
So if you have a suggestion of how to populate the ListNames with the appropriate content, please let me know!
Thanks.