fix paths

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-18 01:34:32 -06:00
parent 939e87c2e9
commit f3d6daa29e
7 changed files with 185 additions and 186 deletions

View File

@ -27,7 +27,7 @@ func ArgDebug() bool {
func init() {
arg.Register(&argDebugger)
full := "go.wit.com/gui/debugger"
full := "go.wit.com/bug/debugger"
short := "bugger"
INFO = log.NewFlag("INFO", false, full, short, "simple debugging Info()")

View File

@ -7,11 +7,11 @@ package debugger
import (
// "regexp"
// "go.wit.com/gui/toolkit"
"sync"
"runtime"
"github.com/sourcegraph/conc"
"github.com/sourcegraph/conc/stream"
"github.com/sourcegraph/conc/panics"
"github.com/sourcegraph/conc/stream"
"runtime"
"sync"
"go.wit.com/log"
)

View File

@ -7,9 +7,9 @@ import (
"fmt"
"sync"
"go.wit.com/log"
"go.wit.com/gui/gui"
"go.wit.com/gui/gadgets"
"go.wit.com/lib/gadgets"
"go.wit.com/log"
)
var debugWG *sync.WaitGroup
@ -25,7 +25,7 @@ func DebugGoChannels(p *gui.Node) *gadgets.BasicWindow {
// var debugWG sync.WaitGroup
g.NewButton("init()", func() {
if (debugNumberChan == nil) {
if debugNumberChan == nil {
log.Log(CHAN, "making debugNumberChan channel")
debugNumberChan = make(chan int)
} else {
@ -94,7 +94,7 @@ func printInt(i int, name string) {
for num := range debugNumberChan {
log.Log(CHAN, "printInt()", name, "read", num, "from channel")
debugWG.Done()
if (tmp == i) {
if tmp == i {
return
}
tmp += 1

View File

@ -1,16 +1,16 @@
package debugger
import (
"fmt"
"bytes"
"fmt"
// "os"
"runtime"
"runtime/debug"
"runtime/pprof"
"go.wit.com/log"
"go.wit.com/gui/gui"
"go.wit.com/gui/gadgets"
"go.wit.com/lib/gadgets"
"go.wit.com/log"
)
func DebugGolangWindow(p *gui.Node) *gadgets.BasicWindow {

14
main.go
View File

@ -3,10 +3,10 @@ package debugger
import (
"os"
"go.wit.com/log"
"go.wit.com/gui/gui"
"go.wit.com/gui/gadgets"
"go.wit.com/gui/lib/logsettings"
"go.wit.com/lib/gadgets"
"go.wit.com/lib/gui/logsettings"
"go.wit.com/log"
)
/*
@ -14,7 +14,7 @@ import (
*/
func DebugWindow(p *gui.Node) {
if (me != nil) {
if me != nil {
log.Warn("Draw then Toggle() debuging window here")
me.bugWin.Toggle()
return
@ -74,7 +74,7 @@ func DebugWindow2(newB *gui.Node, title string) *gui.Node {
gr = newB.NewGroup("more things")
gr.NewButton("Node.ListChildren(true)", func() {
if (activeWidget == nil) {
if activeWidget == nil {
activeWidget = bugWin
}
activeWidget.ListChildren(true)
@ -140,7 +140,7 @@ func dropdownWindow(p *gui.Node) {
log.Log(INFO, "The Window was set to", name)
}
log.Log(INFO, "dd =", dd)
if (activeWidget == nil) {
if activeWidget == nil {
// the debug window doesn't exist yet so you can't display the change
// TODO: make a fake binary tree for this(?)
return
@ -152,7 +152,7 @@ func dropdownWindow(p *gui.Node) {
dd.AddText(child.GetProgName())
// last = child.Name
mapWindows[child.GetProgName()] = child
if (activeWidget == nil) {
if activeWidget == nil {
activeWidget = child
}
}

View File

@ -2,8 +2,8 @@ package debugger
import (
"go.wit.com/gui/gui"
"go.wit.com/gui/gadgets"
"go.wit.com/gui/lib/logsettings"
"go.wit.com/lib/gadgets"
"go.wit.com/lib/gui/logsettings"
)
var me *debuggerSettings
@ -26,6 +26,7 @@ type debuggerSettings struct {
}
var bugWin *gui.Node
/*
// main debugging window
var bugTab *gui.Node

View File

@ -1,16 +1,15 @@
package debugger
import (
"strconv"
"errors"
"strconv"
"go.wit.com/log"
"go.wit.com/gui/gui"
"go.wit.com/gui/widget"
"go.wit.com/gui/gadgets"
"go.wit.com/lib/gadgets"
"go.wit.com/lib/widget"
"go.wit.com/log"
)
/*
func setActiveWidget(w *gui.Node) {
if (w == nil) {
@ -59,7 +58,6 @@ func DebugWidgetWindow(p *gui.Node) *gadgets.BasicWindow {
g2 = g.NewGroup("bool B:")
activeLabelNewB = g2.NewCheckbox("tmp bool")
// common things that should work against each widget
g = w.Box().NewGroup("common things")
g.NewButton("Enable()", func() {
@ -127,7 +125,7 @@ func DebugWidgetWindow(p *gui.Node) *gadgets.BasicWindow {
activeJunk = w.Box().NewGroup("junk:")
activeJunk.NewLabel("test junk")
if (activeWidget == nil) {
if activeWidget == nil {
setActiveWidget(me.myGui)
}
@ -217,7 +215,7 @@ func debugAddWidgetButton(n *gui.Node) {
newY := widget.GetInt(activeLabelNewY.String())
newB := widget.GetBool(activeLabelNewB.String())
if (newY == -1) {
if newY == -1 {
name = name + " (" + strconv.Itoa(activeWidget.NextW) + "," + strconv.Itoa(activeWidget.NextH) + ")"
} else {
// activeWidget.SetNext(newX, newY)