Session Class Methods
Tree Classes don't have any built-in functions. Instead, they're instantiated from the Session Class.
In this section, we discuss the Session class methods. The methods are discussed in alphabetical order.
Syntax
GetTree()
Description
The GetTree method returns a closed tree object. Before you can use some of the methods or any of the properties, you must use the Open method to open a tree object.
Parameters
None.
Returns
A reference to a closed tree object.
Example
To create a new tree, use the following:
&MYTREE = %Session.GetTree();
&MYTREE.Create("","","PERSONAL_NEW", "05-05-1997", "PERSONAL_DATA");
To determine if a tree already exists in the database, use the following code:
&MYTREE = %Session.GetTree();
If &MYTREE.Exists("","","PERSONAL_OLD", "05-05-1997", "PERSONAL_DATA") = 0 then
/* Do processing */
End-If;
To open an existing tree, use the following code:
&MYTREE = %Session.GetTree();
&MYTREE.Open("","","PERSONAL_OLD", "05-05-1997", "PERSONAL_DATA", True);
Syntax
GetTreeStructure()
Description
The GetTreeStructure method returns a closed tree structure object. Before you can use some of the methods or any of the properties, you must use the Open method to open the tree structure object.