Forum Discussion

dreamer2057's avatar
dreamer2057
Channel Surfer
10 years ago

EPG Customize

Hello! How I can customize EPG channel(or program) node element?

I tried to create few pretty simple custom ContentNodes:

Channel


<component name="EpgGridChannel" extends="ContentNode">
<children>
<Poster
id="epgGridChannel"
uri="pkg:/images/channel.png"
width="14"
height="10"
translation="[10,10]"
opacity="1"/>
</children>
</component>


Program


<component name="EpgGridProgram" extends="ContentNode">
<children>
<Poster
id="epgGridProgram"
uri="pkg:/images/program.png"
width="14"
height="10"
translation="[10,10]"
opacity="1"/>
</children>
</component>


In next time, I fill the EPG:



...

sub FillEpgGrid()

m.content = createObject("RoSGNode","ContentNode")
m.top.setFocus(true)

for i = 0 TO m.temp.chns.Count() - 1 STEP 1

addChannel(i)
addPrograms(i)

NEXT i

m.top.content = m.content
' ... EPG view Customization Code ...

end sub
...



And now starts the most intresting things... As i suppose, all what i need is append my custom nodes instead of default, like this:

Default


sub addChannel(index as integer)

channel = m.temp.chns[index]
m.channel = m.content.createChild("ContentNode")
m.channel.TITLE = channel.name

end sub


Custom


sub addChannel(index as integer)

channel = m.temp.chns[index]
m.channel = m.content.createChild("EpgGridChannel")
m.channel.TITLE = channel.name

end sub


I expect that my posters will be inserted into default epg grid, but when i apply content to EPG:



... ' foreach code

m.top.content = m.content

...



a) when i try to customize channels - roku device goes to restart.
b) when i try to customize programs - nothing happens (roku didn't restarted and posters didn't inserted).
How I can customize EPG element?

1 Reply

  • At this moment, for customization, as i understand, will be best to extend Array Grid (or extensions like Markup Grid)