Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sudo97
Visitor

Scene Graph LabelList

Hello, I'm Creating an App for Roku with Scene Graph Framework. I got problem at the beginning. When I create LabelList and download it to my Roku Stick, I press Up and Down buttons and nothing happens -- list doesn't update. Here's my code(took from http://sdkdocs.roku.com/display/sdkdoc/ContentNode#ContentNode-Description)
<?xml version="1.0" encoding="utf-8" ?> 

<!--********** Copyright 2015 Roku Corp. All Rights Reserved. **********-->

<component name="labelScene" extends="Scene" >

<script type="text/brightscript" >
<![CDATA[

sub init()
m.list = m.top.FindNode("coreList")

m.content = createObject("RoSGNode","ContentNode")

addSection("Renderable Nodes")
addItem("Rectangle")
addItem("Rotated Rectangle")
addItem("Label")
addItem("Poster")
addItem("Video")
addItem("Video Zoom")

addSection("Animation Nodes")
addItem("Animation Vector 2D Interpolator")
addItem("Animation Color Interpolator")
addItem("Animation Float Interpolator")
addItem("Sequential Animation")
addItem("Parallel Animation")
addItem("Fade-In Animation")
addItem("Fade-Out Animation")

addSection("Control Nodes")
addItem("Timer")

addSection("Lists and Grids")
addItem("Poster Grid")
addItem("Markup Grid")

m.list.content = m.content
m.list.ObserveField("itemFocused", "printing")
m.top.setFocus(true)
end sub

sub printing()
print "Hello"
end sub

sub addSection(sectiontext as string)
m.sectionContent = m.content.createChild("ContentNode")
m.sectionContent.CONTENTTYPE = "SECTION"
m.sectionContent.TITLE = sectiontext
end sub

sub addItem(itemtext as string)
item = m.sectionContent.createChild("ContentNode")
item.title = itemtext
end sub
]]>
</script>
<children>
<LabelList
id="coreList"
translation="[160,92]"
itemSize="[440,48]"
itemSpacing="[0,0]"
sectionDividerHeight="48.0"
sectionDividerFont="font:MediumBoldSystemFont"
sectionDividerTextColor="0x880088FF"
drawFocusFeedback="true" />
</children>
</component>


Documentation says that Lists automatically response Key-pressings and so on
0 Kudos
2 REPLIES 2
RokuKC
Roku Employee
Roku Employee

Re: Scene Graph LabelList

Please post your question on the Beta Scene Graph announcement discussion:
viewtopic.php?f=34&t=88621
0 Kudos
sudo97
Visitor

Re: Scene Graph LabelList

Sorry, It was my mistake. All I needed was just to set the right focus.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.