summaryrefslogtreecommitdiff
path: root/toolkit/andlabs-direct/common.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-12-20 17:28:00 -0600
committerJeff Carr <[email protected]>2023-12-20 17:28:00 -0600
commit48dfdf322b2cf379d8deeff678747907b604637f (patch)
treef813fc169ac1eb050c39533cc9612c74c9caebd7 /toolkit/andlabs-direct/common.go
parentdd6d1a639b86ab12a2bf537b8588dd5ae60cdad7 (diff)
remove direct code since it probably doesn't work
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs-direct/common.go')
-rw-r--r--toolkit/andlabs-direct/common.go61
1 files changed, 0 insertions, 61 deletions
diff --git a/toolkit/andlabs-direct/common.go b/toolkit/andlabs-direct/common.go
deleted file mode 100644
index 451f9d6..0000000
--- a/toolkit/andlabs-direct/common.go
+++ /dev/null
@@ -1,61 +0,0 @@
-package toolkit
-
-import "log"
-
-func init() {
- if (DebugToolkit) {
- log.Println("gui/toolkit init() Setting defaultBehavior = true")
- }
- setDefaultBehavior(true)
-}
-
-func (t Toolkit) commonChange(widget string) {
- s := t.String()
- if (DebugToolkit) {
- log.Println("gui.Toolkit.ui.OnChanged() =", s)
- }
- if (t.OnChanged != nil) {
- if (DebugToolkit) {
- log.Println("gui.Toolkit.OnChanged() trying to run toolkit.OnChanged() entered val =", s)
- }
- t.OnChanged(&t)
- return
- }
- if (t.Custom != nil) {
- if (DebugToolkit) {
- log.Println("gui.Toolkit.OnChanged() Running toolkit.Custom()")
- t.Dump()
- }
- t.Custom()
- return
- }
- if (DebugToolkit) {
- log.Println("gui.Toolkit.OnChanged() ENDED without finding any callback")
- }
-}
-
-// does some sanity checks on the internal structs of the binary tree
-// TODO: probably this should not panic unless it's running in devel mode (?)
-func (t *Toolkit) broken() bool {
- if (t.uiBox == nil) {
- if (t.uiWindow != nil) {
- if (DebugToolkit) {
- log.Println("gui.Toolkit.UiBox == nil. This is an empty window. Try to add a box")
- }
- t.NewBox()
- return false
- }
- log.Println("gui.Toolkit.UiBox == nil. I can't add a widget without a place to put it")
- // log.Println("probably could just make a box here?")
- // corruption or something horrible?
- panic("wit/gui toolkit/andlabs func broken() invalid goroutine access into this toolkit?")
- panic("wit/gui toolkit/andlabs func broken() this probably should not cause the app to panic here (?)")
- return true
- }
- if (t.uiWindow == nil) {
- log.Println("gui.Toolkit.UiWindow == nil. I can't add a widget without a place to put it (IGNORING FOR NOW)")
- forceDump(t)
- return false
- }
- return false
-}