AddTreeViewNode expects a node handle as the second parameter. You're trying to give it a treeview gadget handle.
TreeViewRoot returns the root node handle. So, to add the first node, do this:
To add more nodes on the same "level", use "TreeViewRoot(tree)" as the seconds parameter. To add "child" nodes, use "meownode" as the second parameter.
TreeViewRoot returns the root node handle. So, to add the first node, do this:
meownode = AddTreeViewNode( "meow",TreeViewRoot( tree ) )
To add more nodes on the same "level", use "TreeViewRoot(tree)" as the seconds parameter. To add "child" nodes, use "meownode" as the second parameter.