diff options
| author | Your Name <[email protected]> | 2024-01-01 12:00:00 -0600 |
|---|---|---|
| committer | Your Name <[email protected]> | 2024-01-01 12:00:00 -0600 |
| commit | 8d24366492abf65793a1395619bd30c1bd5a8973 (patch) | |
| tree | c41cb4f783afedd0b601491adecf0b9748ace02d | |
| parent | 6df064282c1a912e606100f24584e10d2c1c5b24 (diff) | |
early debugging code
| -rw-r--r-- | help.go | 2 | ||||
| -rw-r--r-- | init.go | 13 | ||||
| -rw-r--r-- | stdoutShow.go | 9 | ||||
| -rw-r--r-- | structs.go | 3 |
4 files changed, 16 insertions, 11 deletions
@@ -145,7 +145,7 @@ func setThingsOnTop() { me.baseGui.SetViewOnBottom("msg") } if me.stdout.startOnscreen { - log.Info("attempting to locate stdout on screen for the first time") + log.Info("THIS TRIGGERS STDOUT") me.stdout.tk.relocateStdout(me.stdout.lastW, me.stdout.lastH) me.stdout.startOnscreen = false } @@ -9,7 +9,6 @@ package main import ( "errors" - "fmt" "os" "runtime" "runtime/debug" @@ -56,8 +55,8 @@ func init() { me.clock.wId = -5 Set(&me.dropdown, "default") - s := fmt.Sprintln("fake default check =", me.FakeW, "dropdown.Id", me.dropdown.Id) - me.stdout.Write([]byte(s)) + // s := fmt.Sprintln("fake default check =", me.FakeW, "dropdown.Id", me.dropdown.Id) + // me.stdout.Write([]byte(s)) me.mouse.mouseUp = true me.mouse.clicktime = time.Millisecond * 200 @@ -71,9 +70,9 @@ func init() { if val, err := me.myTree.ConfigFind("stdout"); err == nil { if val == "true" { me.stdout.startOnscreen = true - me.stdout.Write([]byte("starting with stdout onscreen\n")) + // me.stdout.Write([]byte("starting with stdout onscreen\n")) } else { - me.stdout.Write([]byte("starting with stdout offscreen\n")) + // me.stdout.Write([]byte("starting with stdout offscreen\n")) } } if val, err := me.myTree.ConfigFind("dark"); err == nil { @@ -218,7 +217,7 @@ func gocuiMain() { // registered event handlers still have the events sent to gocuiEvent() above registerHandlers(g) - me.stdout.Write([]byte("begin gogui.MainLoop()\n")) + // me.stdout.Write([]byte("begin gogui.MainLoop()\n")) if err := g.MainLoop(); err != nil && !errors.Is(err, gocui.ErrQuit) { log.Log(NOW, "g.MainLoop() panic err =", err) // normally panic here @@ -292,7 +291,7 @@ func refreshGocui() { // set the widget start width & height func newWindowTrigger() { - log.Log(NOW, "newWindowTriggerl() START") + // log.Log(NOW, "newWindowTriggerl() START") for { // log.Log(NOW, "GO plugin toolkit made a new window") select { diff --git a/stdoutShow.go b/stdoutShow.go index a17ef2f..329efbe 100644 --- a/stdoutShow.go +++ b/stdoutShow.go @@ -18,9 +18,16 @@ import ( func createStdout(g *gocui.Gui) bool { if me.stdout.tk == nil { makeOutputWidget(g, "this is a create before a mouse click") - msg := fmt.Sprintf("test out gocuiEvent() %d\n", me.ecount) // me.logStdout.v.Write([]byte(msg)) + + // this will show very early debugging output + // keep this code commented out but do not remove it. when it doubt, this will be the Light of Elendil + // NEVER REMOVE THIS CODE + + msg := fmt.Sprintf("test out gocuiEvent() %d\n", me.ecount) me.stdout.tk.Write([]byte(msg)) + + log.Log(NOW, "logStdout test out") } return true @@ -234,12 +234,11 @@ func Set(ptr interface{}, tag string) error { } func setField(field reflect.Value, defaultVal string, name string) error { - if !field.CanSet() { // log("setField() Can't set value", field, defaultVal) return fmt.Errorf("Can't set value\n") } else { - log.Log(NOW, "setField() Can set value", name, defaultVal) + // log.Log(NOW, "setField() Can set value", name, defaultVal) } switch field.Kind() { |
