diff options
| author | Jeff Carr <[email protected]> | 2024-01-11 22:17:02 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-11 22:17:02 -0600 |
| commit | 7989ed908c75651df37bded92a0c89f8f6bdd87e (patch) | |
| tree | 0a943db3af439d82cccdb9ecbf7f02991b010d36 | |
| parent | ed951e0234d428298bd6b76b07e371ce2ab3cb60 (diff) | |
api updatev0.12.3
Signed-off-by: Jeff Carr <[email protected]>
| -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) |
