summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/slider.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-02-25 14:05:25 -0600
committerJeff Carr <[email protected]>2023-02-25 14:05:25 -0600
commitf3bb68396afa7452ecf1c8d4744c825a9d81057c (patch)
tree00b55a17cee7a8e2f795c479a84a844779993c1c /toolkit/andlabs/slider.go
parent355e5ec968427c2b07b78fec12224f31a65df740 (diff)
The debugging window is finally useful
the gui enabled debugging works --gui-debug works from the command line The debug window can now select things debugging now includes widget types all the debug flags work finally working debugging flags via gui checkboxes add debian packaging rules use log() in the toolkit use a standard log() to simplify debugging flags add reference to 'GO Style Guide' use the same LICENSE from the GO developers. TODO: make this threadsafe TODO: fix plugin stuff Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs/slider.go')
-rw-r--r--toolkit/andlabs/slider.go15
1 files changed, 6 insertions, 9 deletions
diff --git a/toolkit/andlabs/slider.go b/toolkit/andlabs/slider.go
index f9ff0f3..4857935 100644
--- a/toolkit/andlabs/slider.go
+++ b/toolkit/andlabs/slider.go
@@ -1,9 +1,6 @@
package main
import (
- "log"
- "os"
-
"git.wit.org/wit/gui/toolkit"
"github.com/andlabs/ui"
@@ -12,13 +9,13 @@ import (
func (t andlabsT) NewSlider(title string, x int, y int) *andlabsT {
// make new node here
- log.Println("gui.Toolkit.NewSpinbox()", x, y)
+ log(debugToolkit, "gui.Toolkit.NewSpinbox()", x, y)
var newt andlabsT
if (t.uiBox == nil) {
- log.Println("gui.ToolkitNode.NewGroup() node.UiBox == nil. I can't add a range UI element without a place to put it")
- log.Println("probably could just make a box here?")
- os.Exit(0)
+ log(debugToolkit, "gui.ToolkitNode.NewGroup() node.UiBox == nil. I can't add a range UI element without a place to put it")
+ log(debugToolkit, "probably could just make a box here?")
+ exit("internal golang wit/gui/toolkit error")
return nil
}
@@ -36,11 +33,11 @@ func (t andlabsT) NewSlider(title string, x int, y int) *andlabsT {
func NewSlider(parentW *toolkit.Widget, w *toolkit.Widget) {
var newt *andlabsT
- log.Println("gui.andlabs.NewTab()", w.Name)
+ log(debugToolkit, "gui.andlabs.NewTab()", w.Name)
t := mapToolkits[parentW]
if (t == nil) {
- log.Println("go.andlabs.NewTab() toolkit struct == nil. name=", parentW.Name, w.Name)
+ log(debugToolkit, "go.andlabs.NewTab() toolkit struct == nil. name=", parentW.Name, w.Name)
return
}
newt = t.NewSlider(w.Name, w.X, w.Y)