norcaljohnny
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2019
06:16 PM
Creating a Rowlist
Can some please tell me how to create a 1 row rowlist using the generic content reader and an xml file.
For some reason I just can not do it.
Ive seen bloated examples but is there something as simple as creating it like one would a markupgrid or such.
Kind regards!
For some reason I just can not do it.
Ive seen bloated examples but is there something as simple as creating it like one would a markupgrid or such.
Kind regards!
5 REPLIES 5
destruk
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2019
09:22 PM
Re: Creating a Rowlist
SimpleRowList is a good start -
https://sdkdocs.roku.com/download/attac ... 618&api=v2
https://sdkdocs.roku.com/download/attac ... 618&api=v2
norcaljohnny
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2019
09:28 PM
Re: Creating a Rowlist
"destruk" wrote:
SimpleRowList is a good start -
https://sdkdocs.roku.com/download/attac ... 618&api=v2
I was hoping you would help 🙂
Sadly, I still couldnt get it to work.
I was hoping of some example with an xml file. Using an rss feed it I get it to work but not a generic content reader and xml file..
Any other suggestions?
destruk
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2019
09:40 PM
Re: Creating a Rowlist
I think you'll need to be more specific. I mean, if you are already parsing the content into your content node set, and you already can give that set of content to your markupgrid, then you just need a few settings for the rowlist and put the content over there for it. Is it failing when it displays the content on the screen, when interacting with the highlight and selection, or something else?
g-se
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2019
02:09 PM
Re: Creating a Rowlist
I struggled with this for a while myself - I could never get the included sample content reader (from various examples) to load remote content, until I realized that those content readers weren't really coded to parse out the more complex rowlist structure. Here's the solution I came up with:
My XML format:
Then, I modified the content reader to parse this out:
Hope that helps some
My XML format:
<rowlistdata>
<row title = "First Row" >
<rowitem HDPosterUrl = "..." title = "..." />
<rowitem HDPosterUrl = "..." title = "..." />
<rowitem HDPosterUrl = "..." title = "..." />
<rowitem HDPosterUrl = "..." title = "..." />
</row>
<row title = "Second Row" >
<rowitem HDPosterUrl = "..." title = "..." />
<rowitem HDPosterUrl = "..." title = "..." />
<rowitem HDPosterUrl = "..." title = "..." />
<rowitem HDPosterUrl = "..." title = "..." />
</row>
</rowlistdata>
Then, I modified the content reader to parse this out:
sub getcontent()
content = createObject("roSGNode", "ContentNode")
contentxml = createObject("roXMLElement")
readInternet = createObject("roUrlTransfer")
readInternet.setUrl(m.top.contenturi)
contentxml.parse(readInternet.GetToString())
if contentxml.getName()="rowlistdata"
'print "rowlist data found"
for each item in contentxml.GetNamedElements("row")
'print "creating row"
itemcontent = content.createChild("ContentNode")
itemcontent.setFields(item.getAttributes())
for each rowitem in item.GetNamedElements("rowitem")
'print "found row item"
rowitemcontent=itemcontent.createChild("[size=85][font=monospace]ContentNode[/font][/size]")
rowitemcontent.setFields(rowitem.getAttributes())
end for
end for
end if
m.top.content = content
end sub
Hope that helps some
norcaljohnny
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2019
08:27 PM
Re: Creating a Rowlist
"g-se" wrote:
I struggled with this for a while myself - I could never get the included sample content reader (from various examples) to load remote content, until I realized that those content readers weren't really coded to parse out the more complex rowlist structure. Here's the solution I came up with:
My XML format:<rowlistdata>
<row title = "First Row" >
<rowitem HDPosterUrl = "..." title = "..." />
<rowitem HDPosterUrl = "..." title = "..." />
<rowitem HDPosterUrl = "..." title = "..." />
<rowitem HDPosterUrl = "..." title = "..." />
</row>
<row title = "Second Row" >
<rowitem HDPosterUrl = "..." title = "..." />
<rowitem HDPosterUrl = "..." title = "..." />
<rowitem HDPosterUrl = "..." title = "..." />
<rowitem HDPosterUrl = "..." title = "..." />
</row>
</rowlistdata>
Then, I modified the content reader to parse this out:sub getcontent()
content = createObject("roSGNode", "ContentNode")
contentxml = createObject("roXMLElement")
readInternet = createObject("roUrlTransfer")
readInternet.setUrl(m.top.contenturi)
contentxml.parse(readInternet.GetToString())
if contentxml.getName()="rowlistdata"
'print "rowlist data found"
for each item in contentxml.GetNamedElements("row")
'print "creating row"
itemcontent = content.createChild("ContentNode")
itemcontent.setFields(item.getAttributes())
for each rowitem in item.GetNamedElements("rowitem")
'print "found row item"
rowitemcontent=itemcontent.createChild("[size=85][font=monospace]ContentNode[/font][/size]")
rowitemcontent.setFields(rowitem.getAttributes())
end for
end for
end if
m.top.content = content
end sub
Hope that helps some
Works perfectly for my needs! 2000 thanks 🙂