diff options
| author | Jeff Carr <[email protected]> | 2023-02-25 14:05:25 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-02-25 14:05:25 -0600 |
| commit | f3bb68396afa7452ecf1c8d4744c825a9d81057c (patch) | |
| tree | 00b55a17cee7a8e2f795c479a84a844779993c1c /checkbox.go | |
| parent | 355e5ec968427c2b07b78fec12224f31a65df740 (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 'checkbox.go')
| -rw-r--r-- | checkbox.go | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/checkbox.go b/checkbox.go index 0aa6aeb..0372a50 100644 --- a/checkbox.go +++ b/checkbox.go @@ -1,7 +1,5 @@ package gui -import "log" - func (n *Node) Checked() bool { n.Dump() return n.checked @@ -25,22 +23,29 @@ This was the old code func (n *Node) NewCheckbox(name string) *Node { - newNode := n.New(name) + newNode := n.New(name, "Checkbox") newNode.custom = n.custom newNode.Widget.Custom = func() { - log.Println("even newer clicker() name", newNode.Widget) + log(debugChange, "wit go gui checkbox", newNode.Widget) if (n.custom != nil) { + log(debugChange, "trying parent.custom() callback() name =", name) n.custom() } else { - log.Println("wit/gui No callback function is defined for button name =", name) + log(debugChange, "wit/gui No parent.custom() function is defined for button name =", name) + } + if (newNode.custom != nil) { + log(debugChange, "trying newNode.custom() callback name =", name) + newNode.custom() + } else { + log(debugChange, "wit/gui No newNode.custom() function is defined for button name =", name) } } for _, aplug := range allPlugins { - log.Println("gui.NewCheckbox() aplug =", aplug.name, "name =", newNode.Widget.Name) + log(debugGui, "gui.NewCheckbox() aplug =", aplug.name, "name =", newNode.Widget.Name) if (aplug.NewCheckbox == nil) { - log.Println("\tgui.NewCheckbox() aplug.NewCheckbox = nil", aplug.name) + log(debugGui, "\tgui.NewCheckbox() aplug.NewCheckbox = nil", aplug.name) continue } aplug.NewCheckbox(&n.Widget, &newNode.Widget) |
