andlabs: fix bug in flags and chan window create

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2023-04-06 14:16:59 -05:00
parent cd47489d85
commit 70253c31f2
4 changed files with 13 additions and 7 deletions

View File

@ -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`

View File

@ -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:")

View File

@ -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) {

2
tab.go
View File

@ -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
}