Your Digital Media Has Never Looked So Good

 
svencoop
Topic Author
Posts: 2
Joined: Wed Aug 07, 2019 11:18 am

Simple extends="TimeGrid" code

Wed Aug 07, 2019 11:33 am

UPDATE:
Figured out the first step!
TimeGridNode = m.top.findNode("IDTimeGrid")
tempContentNode = CreateObject("roSGNode", "ContentNode")
tempContentNode.Update(rootData)
TimeGridNode.content = tempContentNode

***But cannot figure out how to update the “row” data?***
This is what I am trying:
tempContentNode = CreateObject("roSGNode", "ContentNode")
tempContentNode.Update(RowChildrenData)

row = TimeGridNode.content.GetChild(RowNumberToUpdate)
row.content = tempContentNode


---
I have an existing channel that I wish to add a TimeGrid that does not need to be realtime or lazy loading, etc

As you know, the SGDEX example does show a TimeGrid, but when I tried to merge it with my existing program I had problems! (ComponentController does not want to play with others, etc)
Since I do not want or need the overhead of SGDEX, does anybody have a simple example of how to use the TimeGrid?

Roku confirms that documentation is coming, but it is months away!
Thanks,
Steve
 
svencoop
Topic Author
Posts: 2
Joined: Wed Aug 07, 2019 11:18 am

Re: Simple extends="TimeGrid" code

Thu Aug 22, 2019 6:56 am

Roku finally sent me another example of how to build a time grid (it does not work 100% correctly, but is was helpful!)
So, to add "programs" to the "channel" row:
...
    nextShow = {}
    nextShow.title = "Program Name Here"
    nextShow.description = "Be sure to watch this!"
    nextShow.playStart = PlayStartSeconds
    nextShow.playDuration = PlayDurationSeconds
    newShowItem = row.CreateChild("ContentNode")
    newShowItem.Update(nextShow) 'SetFields() also works...
Hope this helps someone!

Who is online

Users browsing this forum: No registered users and 3 guests