From 6f91f5e080e06cdc0f34b13d23e5fd16ea37259a Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 24 Mar 2023 20:14:18 -0500 Subject: starting to try safe chan and goroutines fix tab title's right before attempting to add chan goroutines removed "where" widget pointer box added to tab experiement with log as it's own repo Signed-off-by: Jeff Carr --- button.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'button.go') diff --git a/button.go b/button.go index e176a34..b083474 100644 --- a/button.go +++ b/button.go @@ -6,11 +6,14 @@ func (n *Node) NewButton(name string, custom func()) *Node { newNode := n.New(name, toolkit.Button, custom) var a toolkit.Action + a.Title = name a.Type = toolkit.Add - // a.Widget = &newNode.widget - // a.Where = &n.widget - // action(&a) + a.Callback = callback newaction(&a, newNode, n) return newNode } + +func callback(i int) { + log(debugError, "button callback() i =", i) +} -- cgit v1.2.3