well i think i got that working endless but i made a few changes to get it working
one thing i cant seem to do is pass on any variables to this section though, to display the springboard
all the variables come back as invalid.
'if validateParam(m.showSearchList, "roAssociativeArray", "displayShowDetailSearchScreen") = false return -1
'shows = getShowsForCategorySearchItem(m.showSearchList, "0")
'screen = preShowDetailScreen("0", "0")
'showIndex = showDetailScreen(screen, shows, showIndex)
I tried hardcoding the "0"'s because those Values arent getting passed on and I am also not sure is this is correct
'if validateParam(m.showSearchList, "roAssociativeArray", "displayShowDetailSearchScreen") = false return -1
'shows = getShowsForCategorySearchItem(m.showSearchList, "0")because the appPosterScreen.brs shows this as being
'if validateParam(category, "roAssociativeArray", "displayShowDetailSearchScreen") = false return -1
'shows = getShowsForCategorySearchItem(category, m.curCategory)but i am not using
"category" and when i tried changing the
"m.showSearchList" to
"category" in the code it just tosses out errors...
see what im trying to do is to pass this onto the appDetailsScreen.brs as i want to reuses that springboard and not the audioplayer style
Sub SearchResultsMain()
'initialize theme attributes like titles, logos and overhang color
initTheme()
'prepare the screen for display and get ready to begin
screen=preShowPosterSearchScreen("", "")
if screen=invalid then
print "unexpected error in preShowPosterSearchScreen"
return
end if
'set to go, time to get started
showPosterSearchScreen(screen)
End Sub
'******************************************************
Function preShowPosterSearchScreen(breadA=invalid, breadB=invalid) As Object
port=CreateObject("roMessagePort")
screen = CreateObject("roPosterScreen")
screen.SetMessagePort(port)
if breadA<>invalid and breadB<>invalid then
screen.SetBreadcrumbText(breadA, breadB)
end if
screen.SetListStyle("flat-category")
return screen
End Function
'******************************************************
Function showPosterSearchScreen(screen As Object) As Integer
categorySearchList = getCategorySearchList()
screen.SetListNames(categorySearchList)
screen.SetContentList(getShowsForCategorySearchItem(categorySearchList[0]))
m.showSearchList = getShowsForCategorySearchItem(categorySearchList[0])
screen.SetContentList(m.showSearchList)
screen.Show()
while true
msg = wait(0, screen.GetMessagePort())
if type(msg) = "roPosterScreenEvent" then
if msg.isListFocused() then
m.curCategory = msg.GetIndex()
screen.SetFocusedListItem(m.curShow)
screen.SetContentList(getShowsForCategorySearchItem(m.showSearchList, m.curCategory))
else if msg.isListItemFocused() then
print"list item focused | current show = "; msg.GetIndex()
else if msg.isListItemSelected() then
m.curShow = msg.GetIndex()
m.curShow = displayShowDetailSearchScreen(m.showSearchList, m.curShow)
screen.SetFocusedListItem(m.curShow)
else if msg.isScreenClosed() then
return -1
end if
end If
end while
End Function
'**********************************************************
'** When a poster on the home screen is selected, we call
'** this function passing an roAssociativeArray with the
'** ContentMetaData for the selected show. This data should
'** be sufficient for the springboard to display
'**********************************************************
Function displayShowDetailSearchScreen(category as Object, showIndex as Integer) As Integer
[color=#FF0000]
'if validateParam(m.showSearchList, "roAssociativeArray", "displayShowDetailSearchScreen") = false return -1
'shows = getShowsForCategorySearchItem(m.showSearchList, "0")
'screen = preShowDetailScreen("0", "0")
'showIndex = showDetailScreen(screen, shows, showIndex)[/color]
'return showIndex
print "current show = "
return 1
End Function
'***************************************************************
Function getCategorySearchList() As Object
categorySearchList = CreateObject("roArray", 10, true)
categorySearchList = [ "Search Results" ]
return categorySearchList
End Function
'********************************************************************
Function getShowsForCategorySearchItem(category As Object) as Object
m.UrlBase = "http://xxxx.com/"
m.UrlGetMp3Info = m.UrlBase + "/xml/mp3Playlist.php"
http = NewHttp(m.UrlGetMp3Info)
rsp = http.Http.GetToString()
xml = CreateObject("roXMLElement")
if not xml.Parse(rsp) then
print "Can't parse response"
ShowConnectionFailed()
return ""
end if
if xml.GetName() <> "songs"
Dbg("Bad register response: ", xml.GetName())
ShowConnectionFailed()
return ""
end if
if islist(xml.GetBody()) = false then
Dbg("No registration information available")
ShowConnectionFailed()
return ""
end if
showSearchList = []
For Each song in xml.song
'initialize variables with empty strings, just in case they're missing in the XML
title = ""
url = ""
image = ""
fmt = ""
desc = ""
author = ""
title = song.name.GetText()
url = song.url.GetText()
author = song.author.GetText()
image = song.image.GetText()
fmt = song.fmt.GetText()
desc = song.desc.GetText()
song = CreateSong(title, desc, author, fmt, url, image)
showSearchList.Push(song)
Next
return showSearchList
End Function
This will then be used as a search for the video player example.... almost there Endless just see me through this! almost there
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway