BrightScript Debugger> o = createObject("roSgNode", "Node"): ? o
<Component: roSGNode> =
change: <Component: roAssociativeArray>
focusedChild: <Component: roInvalid>
BrightScript Debugger> ? o.count()
BrightScript Debugger> ? o.doesExist("id")
BrightScript Debugger> ? getInterface(o, "ifAssociativeArray")
It seem that roSgNode (AKA everything RSG) implements ifAssociativeArray? Is this intentional and official - or is it a leaky abstraction or subject to change?
It is intentional and official. The SDK docs have been updated now.
- What does roSgNode.clear() do? It seems to erase all fields - but what is "all" when there is nested-component inheritance? Also what about the baked-in fields?
- What does roSgNode.append() do? Is it alias to roSgNode.addFields() mish-mash maker?
clear() can only delete dynamically added fields.
<field id="foo" type="assocarray" onChange="bar"/>