diff options
| -rw-r--r-- | main.go | 3 | ||||
| -rw-r--r-- | node.go | 6 |
2 files changed, 5 insertions, 4 deletions
@@ -22,7 +22,8 @@ func init() { me.prefix = "wit" // Populates the top of the binary tree - me.rootNode = addNode("guiBinaryTree") + me.rootNode = addNode() + me.rootNode.progname = "guiBinaryTree" me.rootNode.WidgetType = widget.Root me.rootNode.hidden = false // always send the rootNode to the toolkits @@ -11,7 +11,8 @@ import ( func (n *Node) newNode(title string, t widget.WidgetType) *Node { var newN *Node - newN = addNode(title) + newN = addNode() + newN.value = title newN.WidgetType = t if n.WidgetType == widget.Grid { @@ -29,9 +30,8 @@ func (n *Node) newNode(title string, t widget.WidgetType) *Node { /* raw create function for a new node struct */ -func addNode(title string) *Node { +func addNode() *Node { n := new(Node) - n.label = title n.id = me.counter log.Log(NODE, "addNode = widget setid =", n.id) |
