darrenan
June 2nd, 2021, 20:43
Both DB.createChild and databasenode.createChild have the following documented for the 'name' parameter:
name (string) [optional]
A relative node identifier specifying the child node to find. If this parameter is omitted, a new unique node name will be generated.
How do you omit a parameter? Passing in nil or "" to these functions causes a script error. Omitting the parameter entirely, for example myNode.createChild("string") or DB.createChild(myNode, "string"), creates a node named string instead of autogenerating a name. Is this documentation incorrect?
In general, how do you directly create a typed node with an autogenerated name?
name (string) [optional]
A relative node identifier specifying the child node to find. If this parameter is omitted, a new unique node name will be generated.
How do you omit a parameter? Passing in nil or "" to these functions causes a script error. Omitting the parameter entirely, for example myNode.createChild("string") or DB.createChild(myNode, "string"), creates a node named string instead of autogenerating a name. Is this documentation incorrect?
In general, how do you directly create a typed node with an autogenerated name?