From 70253c31f25df6dcd35cc9ba214beb0420599e72 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 6 Apr 2023 14:16:59 -0500 Subject: [PATCH] andlabs: fix bug in flags and chan window create Signed-off-by: Jeff Carr --- README-goreadme.md | 6 +++--- debugWindow.go | 6 +++--- main.go | 6 ++++++ tab.go | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/README-goreadme.md b/README-goreadme.md index 4b24a4d..facff4a 100644 --- a/README-goreadme.md +++ b/README-goreadme.md @@ -137,7 +137,7 @@ Creates a window helpful for debugging this package loads and initializes a toolkit (andlabs/ui, gocui, etc) -### func [Main](/main.go#L121) +### func [Main](/main.go#L127) `func Main(f func())` @@ -159,7 +159,7 @@ This should not pass a function `func ShowDebugValues()` -### func [StandardExit](/main.go#L173) +### func [StandardExit](/main.go#L179) `func StandardExit()` @@ -252,7 +252,7 @@ You get a window `func Start() *Node` -#### func [StartS](/main.go#L107) +#### func [StartS](/main.go#L113) `func StartS(name string) *Node` diff --git a/debugWindow.go b/debugWindow.go index 7994e82..bed630a 100644 --- a/debugWindow.go +++ b/debugWindow.go @@ -46,16 +46,16 @@ func (n *Node) DebugTab(title string) *Node { cb.Set(false) gog.NewButton("Debug Flags", func () { - newN.DebugFlags(makeTabs) + bugWin.DebugFlags(makeTabs) }) gog.NewButton("Debug Widgets", func () { DebugWidgetWindow(newN) }) gog.NewButton("GO Language Internals", func () { - newN.DebugGolangWindow(makeTabs) + bugWin.DebugGolangWindow(makeTabs) }) gog.NewButton("GO Channels debug", func () { - newN.DebugGoChannels(makeTabs) + bugWin.DebugGoChannels(makeTabs) }) gog.NewLabel("Force Quit:") diff --git a/main.go b/main.go index 51a44c3..65197be 100644 --- a/main.go +++ b/main.go @@ -104,6 +104,12 @@ func Start() *Node { return Config.rootNode } +func (n *Node) LoadPlugin(name string) bool { + StartS(name) + Redraw(name) + return true +} + func StartS(name string) *Node { log(logInfo, "Start() Main(f) for name =", name) if (LoadToolkit(name) == false) { diff --git a/tab.go b/tab.go index e425068..49632ee 100644 --- a/tab.go +++ b/tab.go @@ -16,6 +16,6 @@ func (n *Node) NewTab(text string) *Node { a.Text = text newaction(&a, newNode, n) - newBox := newNode.NewBox(text + "tab hbox", true) + newBox := newNode.NewBox(text, true) return newBox }