belltown -
Thank you so much! I think that your solution is exactly what I need, but I've run across one other roadblock. When clicking the free preview category (the first category listed), it does not load if the device is not linked.
I believe this is because of this function:
Function displayCategoryPosterScreen(category As Object) As Dynamic
if isLinked() then
if validateParam(category, "roAssociativeArray", "displayCategoryPosterScreen") = false return -1
screen = preShowPosterScreen(category.Title, "")
print "attempting to show Poster Screen for " + category.Title
showPosterScreen(screen, category)
return 0
else
return 1
end if
End Function
That function was modified in appHomeScreen.brs to prevent someone from being able to back out of the registration code page and still access the content. Is there a better way to do this, or how do I modify that function to allow access to the first category when the device is not linked?
Also, here is the full showHomeScreen(screen) function (now modified with your code from above) for the first piece, if that is needed, too.
Function showHomeScreen(screen) As Integer
if validateParam(screen, "roPosterScreen", "showHomeScreen") = false return -1
initCategoryList()
screen.SetContentList(m.Categories.Kids)
screen.SetFocusedListItem(1)
screen.Show()
while true
msg = wait(0, screen.GetMessagePort())
if type(msg) = "roPosterScreenEvent" then
print "showHomeScreen | msg = "; msg.GetMessage() " | index = "; msg.GetIndex()
if msg.isListFocused() then
print "list focused | index = "; msg.GetIndex(); " | category = "; m.curCategory
else if msg.isListItemSelected() then
if msg.GetIndex () > 0 then doRegistration()
print "list item selected | index = "; msg.GetIndex()
kid = m.Categories.Kids[msg.GetIndex()]
if kid.type = "special_category" then
displaySpecialCategoryScreen()
else
displayCategoryPosterScreen(kid)
end if
else if msg.isScreenClosed() then
return -1
end if
end If
end while
return 0
End Function