diff options
| author | Jeff Carr <[email protected]> | 2022-11-13 08:53:03 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2022-11-13 08:53:03 -0600 |
| commit | 207cf7ea16f1da8fa9f893504d77a2856298cc22 (patch) | |
| tree | 54d513b83ce797be75268f7d8867e0b01ab8f23e /int.go | |
| parent | ed382bec55be25039e4dcf020d1512139855c9bb (diff) | |
Massive refactor to use go plugins. This is neat.
update README.md
set xterm title. make os.Exit() default on window close
add a toolkit.Widget to the node structure
remove 'Greeter' symbol mapping scheme
removed the testing greeter code
plugins:
attempt to load plugins in a sensible order
andlabs/ui:
working andlabs/ui plugin (andlabs2)
buttons work in andlabs plugin
TODO: re-implement non-plugin version for Windows
mswindows doesn't support go plugins yet
gocui:
put the gocui console so file in the binary
does a full init of gocui plugin
Button() and Group() working very well with gogui
cleanly exit gocui
technically you can load two toolkits at the same time
kinda both working at the same time. esoteric
two working plugins at the same time
give up working on two gui's at the same time
this is fun, but _not interesting
wow. this actually works. NewButton() from both toolkits
examples:
all the examples run again
remove early helloplugin example
buttonplugin example cmd code
buttonplugin runs and ldd is minimum
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'int.go')
| -rw-r--r-- | int.go | 19 |
1 files changed, 4 insertions, 15 deletions
@@ -4,8 +4,6 @@ import "log" import "github.com/davecgh/go-spew/spew" -import toolkit "git.wit.org/wit/gui/toolkit/andlabs" - /* Get the int from the gui toolkit because eventually this gui package should become it's own seperate go routine and never interact from the @@ -16,18 +14,14 @@ import toolkit "git.wit.org/wit/gui/toolkit/andlabs" Is it "has to go" or "should go"? Probably it makes sense to strictly inforce it. No "callback" functions. IPC only (go channels) */ func (n *Node) Int() int { - if (toolkit.DebugToolkit) { + if (Config.Debug.Toolkit) { log.Println("gui.Node.Int() for node name =", n.Name) scs := spew.ConfigState{MaxDepth: 1} scs.Dump(n) } - if (n.toolkit == nil) { - log.Println("gui.Node.Int() for toolkit struct = nil") - return 0 - } - - i := n.toolkit.Value() + // i := n.toolkit.Value() + i := 3333 return i } @@ -38,11 +32,6 @@ func (n *Node) Value() int { func (n *Node) SetValue(i int) { log.Println("gui.SetValue() START") - if (n.toolkit == nil) { - log.Println("gui.Node.SetValue() for toolkit struct = nil") - panic("SetValue failed") - } n.Dump() - n.toolkit.Dump() - n.toolkit.SetValue(i) + // n.toolkit.SetValue(i) } |
