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.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Channel Surfer

Advance RowList Example SDK

Looking thru and taking apart the advanced rowlist example in the sdk and have run into something. In the example the label list is being assigned values from a static list.  Each value is passed to the sub addRowListTestItem as a string. Well, according the doc the labellist will probably be populated from a feed from a server. If a task is created to get info from server, the content is returned to the code, how can the content then passed to the sub to set the values of labelist title? I don't think it can as a string since it's not a string but a  contentnode. Is there a way like with an array where you can step thru each value passing the title field value to the sub with a contentnode? If the m.list.content is set to the task.content, the label is populated basically eliminating the need to pass the value to the sub, correct? Have I overlooked something in the process?
From sdk
function init()
    print "in rowListExamplesListPanel init"
    m.list ="examplesList") = m.list
    m.rowListTestListContent = createObject("RoSGNode", "ContentNode")
    addRowListTestItem("Simple Test", "SimpleRowListPanel")
    addRowListTestItem("Mixed Aspect Test", "MixedAspectRowListPanel")
    addRowListTestItem("Markup On Focus Test", "MarkupOnFocusRowListPanel")
    m.list.content = m.rowListTestListContent
    ' set up the PanelSet title to be "RowList Examples"
    ' when this panel is on the left = "RowList Examples"           = "GridExamplesListPanel"    = "narrow" = true
    ' observe focusedChild to that the LabelList can
    ' take the key event focus when the PanelSet gives
    ' the focus to this Panel"focusedChild", "focusChanged")"createNextPanelIndex", "createRowListExamplePanel")
end function

sub addRowListTestItem(label as string, component as string)
print "in addRowListTestItem"
   testListItemNode = createObject("RoSGNode", "RowListExampleContentNode")

   ' setting title will set the RowListExampleContentNode's ContentMetaData field
   testListItemNode.title = label

   ' setting componentName will set the RowListExampleContentNode's componentName
   ' interface field
   testListItemNode.componentName = component

end sub
0 Kudos
Channel Surfer

Re: Advance RowList Example SDK

SOLVED  thanks to
0 Kudos