From 1441f90e5a4032c7419e252cc12c6e406d996ed3 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 9 Sep 2025 03:16:43 -0500 Subject: smarter init() --- init.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'init.go') diff --git a/init.go b/init.go index 10cdcb4..b2e9f18 100644 --- a/init.go +++ b/init.go @@ -11,9 +11,6 @@ import ( "go.wit.com/widget" ) -// const Xaxis = 0 // stack things horizontally -// const Yaxis = 1 // stack things vertically - func initNew() { defer func() { if r := recover(); r != nil { @@ -23,9 +20,9 @@ func initNew() { log.Log(INFO, "init() has been run") me.counter = 0 - // me.prefix = "wit" // Populates the top of the binary tree + // todo: switch this to protobuf me.rootNode = addNode() me.rootNode.progname = "guiBinaryTree" me.rootNode.WidgetType = widget.Root @@ -42,13 +39,16 @@ func initNew() { me.guiChan = make(chan widget.Action, 1) + go watchCallback() +} + +func colorBanner() { version, err := getGuiVersion() log.Printf("go.wit.com/gui %s %s %v\n", version, showVersion(), err) if version == "" { log.Warn("Warning: compiled without version", err) - log.Sleep(1) } - go watchCallback() + time.Sleep(1200 * time.Millisecond) // done for effect } // what genius figured this out? -- cgit v1.2.3