我尝试了以下代码的几种变体,但是,我无法显示“新”行的标题。
' Create a parent node for the RowList.
parentRowlistNode = CreateObject("roSGNode", "ContentNode")
continueNode = CreateObject("roSGNode", "ContentNode")
continueNode.addFields( { "order": "most_recent", "TITLE": "Some new row" } )
continueNode.AppendChild(feedItem)
newgridChildren = []
' Update the RowList with the newly added row.
rowList = gridScreen.FindNode("rowList")
'newgridChildren.Push(continueNode)
for each gridChild in gridChildren
newgridChildren.Push(gridChild)
end for
newgridChildren.Push(continueNode)
'rowList.content.Update({
' children: newgridChildren
'}, true)
parentRowlistNode.Update({
children: newgridChildren
}, true)
gridScreen.content = parentRowlistNode
continueNode.addFields( { "order": "most_recent", "TITLE": "Some new row" } )
到
continueNode.Update( { "order": "most_recent", "TITLE": "Some new row" }, true )