18 lines
393 B
Plaintext
18 lines
393 B
Plaintext
-- create a tree
|
|
root = script("TreeItem").new("root")
|
|
a = script("TreeItem").new("a")
|
|
root.addChild(a)
|
|
b = script("TreeItem").new("b")
|
|
root.addChild(b)
|
|
a1 = script("TreeItem").new("a1")
|
|
a.addChild(a1)
|
|
a11 = script("TreeItem").new("a11")
|
|
a1.addChild(a11)
|
|
a12 = script("TreeItem").new("a12")
|
|
a1.addChild(a12)
|
|
b1 = script("TreeItem").new("b1")
|
|
b.addChild(b1)
|
|
|
|
-- print the tree
|
|
root.printTree()
|