Tree Item - Add Method
Add a new design instance
Member of Tree Item (PRIM_TREE.TreeItem)
Parameters
Name | Type | Data Type | Description |
|---|---|---|---|
Result | *Result (Optional) | Reference to the newly created item | |
DesignType | *Input | Name of the reusable part to create as the design instance. |
Details
The Add method is used to add specialized design type instances to the Tree as a child of the item.
Design reusable parts must implement the Prim_Book.iBookDesign interface and inherit from the class specified in the Design property of the Book.
When using the Add method, Tree no longer works like a LANSA list, and is intended for more advanced implementations.
Example
Adding a specialized design type, in this case a page for an Employee data object.
Mthroutine Name(AddItem)
Define_Com Class(#prim_Tree.TreeItem) Name(#Item) Reference(*Dynamic)
#Item <= #ThisItem.Add(#MyEmployeeItem)
#Item.RelatedReference <= #DataEmployee
Endroutine