Forum Discussion
malort
9 years agoVisitor
"Veeta" wrote:
There is a new API in 7.6 that I'm hopeful will address this: ifSGNodeField.update. In my experience, anything that can be done natively (vs. in BRS code) is a huge performance boost. ifSGNodeField.update should be able to take ParseJSON output and convert it into a node tree in one call.
Yeah, that could definitely be a useful performance boost to convert nodes containing roArray/roAA into nodes, but there are still some limitations there.
- The initial roAA won't be able to contain functional fields, unlike creating a custom node directly. This is the key benefit we've been looking for. If only RSG has first-class function support.
- You still need to set the roArray/roAA to a content node (deep-copy), then you can call node.Update() to convert the children.
I'm running 7.6 right now, but node.Update() doesn't seem to be working at all. Maybe I should finish my morning coffee.
Brightscript Debugger> content = CreateObject("roSGNode", "node")
Brightscript Debugger> ?content.getChildCount()
0
Brightscript Debugger> ?content.update()
Member function not found in BrightScript Component or interface. (runtime error &hf4) in $LIVECOMPILE(191)