diff options
Diffstat (limited to 'node.go')
| -rw-r--r-- | node.go | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -10,15 +10,13 @@ func (n *Node) newNode(title string, t toolkit.WidgetType, custom func()) *Node newN = addNode(title) newN.WidgetType = t - newN.widget.Type = t - // newN.widget.Action = "New" newN.Custom = custom // TODO: This should not be defined for each widget. This has to be stupid // or wait a second, is this where I send something to a channel? - newN.widget.Custom = func() { - log(debugChange, "Trying to find Window Close. widget.Type =", newN.widget.Type) - if (newN.widget.Type == toolkit.Window) { + newN.Custom = func() { + log(debugChange, "Trying to find Window Close. widgetType =", newN.WidgetType) + if (newN.WidgetType == toolkit.Window) { log(debugChange, "Need to delete newN here") n.Delete(newN) } @@ -45,7 +43,6 @@ func addNode(title string) *Node { n.Name = title n.Text = title n.id = Config.counter - n.widget.Id = n.id log(debugNode, "addNode = widget setid =", n.id) Config.counter += 1 |
