I'm not sure if this is a bug in my code itself or a bug in the Roku software. It seems to be that if you use a specific combination of function calls it will make the row list indexes and the row focus index produce gibberish. I'm able to replicate it in the Simple Grid example. So here is a link to the full code that causes the problem:
https://www.dropbox.com/s/bohy240b34llw ... leGrid.txtSo if you use a "mixed-aspect-ratio" grid style, then set an empty content row and then hide that empty row, you can cause all sorts of problems in it by also setting the row styles. So doing this:
print "enter showGridScreen"
categoryList = getCategoryList()
categoryList[0] = "GridStyle: " + gridstyle
categoryList[1] = "Test Empty: "
screen.setupLists(categoryList.count())
screen.SetListNames(categoryList)
' Uncomment To cause bad row data
'screen.SetListPosterStyles(["portrait","portrait","portrait","portrait","portrait","portrait"])
StyleButtons = getGridControlButtons()
screen.SetContentList(0, StyleButtons)
screen.SetContentList(1, []) ' Empty Row
for i = 2 to categoryList.count()-1
screen.SetContentList(i, getShowsForCategoryItem(categoryList[i]))
end For
screen.SetListVisible(1, false) ' Hide Empty Row
screen.Show()
Here is a sample of the output:
------ Running ------
starting grid style= mixed-aspect-ratio
enter showGridScreen
getting shows for category History
getting shows for category News
getting shows for category Comedy
getting shows for category Drama
Waiting for message
Got Message:roGridScreenEvent
msg= , index= 0 data= 0
list item focused | current show = 0
Waiting for message
Got Message:roGridScreenEvent
msg= , index= 20 data= 8947848
list item focused | current show = 20
Waiting for message
Got Message:roGridScreenEvent
msg= , index= 0 data= 0
list item focused | current show = 0
Waiting for message
Got Message:roGridScreenEvent
msg= , index= 2 data= 0
list item focused | current show = 2
Waiting for message
Does anybody notice anything wrong with the code itself. Doesn't seem like it should be producing the gibberish row data like it does. Am I doing anything wrong or is it a bug? Thanks.