InsertRoot method: Tree class
Syntax
InsertRoot(NodeName)
Description
The InsertRoot method inserts a node at the top of the tree object executing the method. NodeName is the name of the node you are creating. This parameter takes a string value. The InsertRoot method can be used only on an open tree, not on a closed tree. This means you must have opened the tree with the Open method before you can insert any nodes.
You can insert the root node only in a new tree, that is, a tree that was just created with the Create method. Also, after you create a new tree, you must insert the root node before you can insert any other nodes.
In a strict level tree, the first level must be defined before you can insert the root node.
This method returns an error if the tree already has nodes in it.
Returns
A reference to a node object.
Example
&MyRootNode = &MYTREE.InsertRoot("000001");
Related Topics