Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
svencoop
Level 7

Simple extends="TimeGrid" code

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
0 Kudos
1 Reply
svencoop
Level 7

Re: Simple extends="TimeGrid" code

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!
0 Kudos