api update

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-11 22:17:02 -06:00
parent e2958fe561
commit 25ed10c0ec
2 changed files with 5 additions and 4 deletions

View File

@ -22,7 +22,8 @@ func init() {
me.prefix = "wit" me.prefix = "wit"
// Populates the top of the binary tree // 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.WidgetType = widget.Root
me.rootNode.hidden = false // always send the rootNode to the toolkits me.rootNode.hidden = false // always send the rootNode to the toolkits

View File

@ -11,7 +11,8 @@ import (
func (n *Node) newNode(title string, t widget.WidgetType) *Node { func (n *Node) newNode(title string, t widget.WidgetType) *Node {
var newN *Node var newN *Node
newN = addNode(title) newN = addNode()
newN.value = title
newN.WidgetType = t newN.WidgetType = t
if n.WidgetType == widget.Grid { 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 raw create function for a new node struct
*/ */
func addNode(title string) *Node { func addNode() *Node {
n := new(Node) n := new(Node)
n.label = title
n.id = me.counter n.id = me.counter
log.Log(NODE, "addNode = widget setid =", n.id) log.Log(NODE, "addNode = widget setid =", n.id)