summaryrefslogtreecommitdiff
path: root/toolkit/andlabs
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-12-20 05:58:33 -0600
committerJeff Carr <[email protected]>2023-12-20 05:58:33 -0600
commit85b9a036c289fe840e69e1852866f429b87cf63e (patch)
treeeb18f693027cd220f71c0fb015a67346d82a37cc /toolkit/andlabs
parent87ab9a958d9eb9f4db35d5c9f9ce923df3132dad (diff)
code moved to the cloudflare package
use the cloudflare package add a protobuf attempt better change detection, but formatting is broken don't redraw widgets if they are not visible create new dns entry worked attempting a DNS RR create attempt a create API call use cloudflare recommended ENV vars turn off debugging Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs')
-rw-r--r--toolkit/andlabs/action.go4
-rw-r--r--toolkit/andlabs/add.go9
-rw-r--r--toolkit/andlabs/debug.go12
-rw-r--r--toolkit/andlabs/main.go11
-rw-r--r--toolkit/andlabs/updateui.go3
5 files changed, 23 insertions, 16 deletions
diff --git a/toolkit/andlabs/action.go b/toolkit/andlabs/action.go
index 29b797a..5352fc8 100644
--- a/toolkit/andlabs/action.go
+++ b/toolkit/andlabs/action.go
@@ -38,11 +38,11 @@ func (n *node) enable(b bool) {
}
func (n *node) pad(at toolkit.ActionType) {
- log(debugError, "pad()")
+ log(logInfo, "pad() on WidgetId =", n.WidgetId)
t := n.tk
if (t == nil) {
- log(debugError, "pad() toolkit struct == nil. for", n.WidgetId)
+ log(logError, "pad() toolkit struct == nil. for", n.WidgetId)
return
}
diff --git a/toolkit/andlabs/add.go b/toolkit/andlabs/add.go
index 9963b79..82d962f 100644
--- a/toolkit/andlabs/add.go
+++ b/toolkit/andlabs/add.go
@@ -127,15 +127,16 @@ func (p *node) place(n *node) bool {
return true
case toolkit.Tab:
if (p.tk.uiTab == nil) {
- log(logError, "p.tk.uiTab == nil", p.tk)
+ log(logError, "p.tk.uiTab == nil for n.WidgetId =", n.WidgetId, "p.tk =", p.tk)
panic("p.tk.uiTab == nil")
}
if (n.tk.uiControl == nil) {
- log(logError, "n.tk.uiControl == nil", n.tk)
+ log(logError, "n.tk.uiControl == nil for n.WidgetId =", n.WidgetId, "n.tk =", n.tk)
panic("n.tk.uiControl == nil")
}
- log(logError, "THIS SHOULD NEVER HAPPEN ??????? trying to place() node=", n.WidgetId, n.Name, n.Text, n.WidgetType)
- log(logError, "THIS SHOULD NEVER HAPPEN ??????? trying to place() on parent=", p.WidgetId, p.Name, p.Text, p.WidgetType)
+ log(logError, "CHECK LOGIC ON THIS. APPENDING directly into a window without a tab")
+ // log(logError, "THIS SHOULD NEVER HAPPEN ??????? trying to place() node=", n.WidgetId, n.Name, n.Text, n.WidgetType)
+ // log(logError, "THIS SHOULD NEVER HAPPEN ??????? trying to place() on parent=", p.WidgetId, p.Name, p.Text, p.WidgetType)
// panic("n.tk.uiControl == nil")
p.tk.uiTab.Append(n.Text, n.tk.uiControl)
p.tk.boxC += 1
diff --git a/toolkit/andlabs/debug.go b/toolkit/andlabs/debug.go
index 33f8c44..d9f8e58 100644
--- a/toolkit/andlabs/debug.go
+++ b/toolkit/andlabs/debug.go
@@ -14,12 +14,12 @@ var stretchy bool // expand things like buttons to the maximum size
var padded bool // add space between things like buttons
var margin bool // add space around the frames of windows
-var debugToolkit bool = true
-var debugChange bool = true
-var debugPlugin bool = true
-var debugAction bool = true
-var debugFlags bool = true
-var debugGrid bool = true
+var debugToolkit bool = false
+var debugChange bool = false
+var debugPlugin bool = false
+var debugAction bool = false
+var debugFlags bool = false
+var debugGrid bool = false
var debugNow bool = true
var debugError bool = true
diff --git a/toolkit/andlabs/main.go b/toolkit/andlabs/main.go
index e2d34a3..3430769 100644
--- a/toolkit/andlabs/main.go
+++ b/toolkit/andlabs/main.go
@@ -40,13 +40,18 @@ func init() {
// log(debugToolkit, "init() Setting defaultBehavior = true")
setDefaultBehavior(true)
- // andlabs = make(map[int]*andlabsT)
- pluginChan = make(chan toolkit.Action, 1)
- log(logNow, "Init() start channel reciever")
+ // TODO: this is messed up. run ui.Main() from the first add? Initialize it with an empty thing first?
+ // fake out the OS toolkit by making a fake window. This is probably needed for macos & windows
+ // actually, this probably breaks the macos build
go ui.Main(func() {
demoUI()
})
+
+ // andlabs = make(map[int]*andlabsT)
+ pluginChan = make(chan toolkit.Action, 1)
+
+ log(logNow, "Init() start channel reciever")
go catchActionChannel()
log(logNow, "Init() END")
}
diff --git a/toolkit/andlabs/updateui.go b/toolkit/andlabs/updateui.go
index 4752d67..c43e15f 100644
--- a/toolkit/andlabs/updateui.go
+++ b/toolkit/andlabs/updateui.go
@@ -86,7 +86,8 @@ func demoUI() {
messageLabel.SetText("")
})
- mainWindow.Show()
+ // this is messed up.
+ // mainWindow.Show()
}
/*