diff options
| author | Jeff Carr <[email protected]> | 2025-09-03 17:31:35 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-03 17:31:35 -0500 |
| commit | 751fb0ff87a3514bda02d576eafe826950a60e2f (patch) | |
| tree | 98934927c14cc23fd21bb1e5992a1bc88982ffa0 | |
| parent | 09e94187bfbabdfad3a41e0b2a8b56d4e55650ca (diff) | |
make something to debug unloading toolkits
| -rw-r--r-- | checkbox.go | 5 | ||||
| -rw-r--r-- | init.go | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/checkbox.go b/checkbox.go index 17cceae..8ba4f8d 100644 --- a/checkbox.go +++ b/checkbox.go @@ -5,6 +5,11 @@ import ( "go.wit.com/widget" ) +func (n *Node) IsChecked() bool { + return n.checked +} + +// deprecate this name func (n *Node) Checked() bool { return n.checked } @@ -4,6 +4,7 @@ import ( "errors" "os" "runtime/debug" + "time" "go.wit.com/lib/protobuf/guipb" "go.wit.com/log" @@ -138,6 +139,17 @@ func pluginCounter(a *widget.Action) { } } +func UnloadToolkits() { + if me.rootNode == nil { + log.Log(WARN, "gui rootNode == nil. can't UnloadToolkits()") + return + } + for _, aplug := range allPlugins { + me.rootNode.CloseToolkit(aplug.name) + time.Sleep(100 * time.Millisecond) // maybe a good idea for now + } +} + func toolkitPanic(pname string) { log.Log(WARN, "toolkitPanic() in", pname) log.Log(WARN, "toolkitPanic() unload toolkit plugin here", pname) |
