I modifed to below code. When executed, task runs, content created but I get syntax error where dataItem fields are being set. Also noticed if I try to set the dataItem fields by using m.top.channelcontent, I get nothing.
function init()
?"IN init"
m.simpleMarkupList = m.top.findNode("SimpleMarkupList")
m.simpleMarkupGrid = m.top.findNode("SimpleMarkupGrid")
m.ContentTask = createObject("RoSGNode","InitialContentReader")
m.ContentTask.control = "RUN"
?"TASK RAN"
m.simpleMarkupList.content=getMarkupListData()
m.simpleMarkupList.SetFocus(true)
m.simpleMarkupList.ObserveField("itemFocused", "onFocusChanged")
m.simpleMarkupGrid.content = getMarkupGridData()
end function
function getMarkupListData() as object
?"IN GETMARKUPLISTDATA"
data = CreateObject("roSGNode", "ContentNode")
dataItem = data.CreateChild("SimpleListItemData")
dataItem.posterUrl = m.ContentTask.channelcontent.hdposterurl 'GET SYNTAX ERROR STARTING HERE
dataItem.labelText = m.ContentTask.channelcontent.title
dataItem.label2Text = m.ContentTask.channelcontent.title
return data
end function
If I run like above I get this message in the Task port:
=================================================================
Warnings occurred while spawning thread for Task component InitialContentReader
spawning thread aborted because: channel exit or timeout waiting for render thread
=================================================================
If I comment out the dataItem setting fields, the task runs with no warnings or errors, but of course no fields are created.