parent
66f87e3448
commit
95b019ad22
|
@ -8,7 +8,7 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
"go.wit.com/lib/widget"
|
"go.wit.com/widget"
|
||||||
// "go.wit.com/gui/toolkits/tree"
|
// "go.wit.com/gui/toolkits/tree"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ func doAction(a widget.Action) {
|
||||||
log.Log(INFO, "doAction() START a.ActionType =", a.ActionType)
|
log.Log(INFO, "doAction() START a.ActionType =", a.ActionType)
|
||||||
log.Log(INFO, "doAction() START a.ProgName =", a.ProgName)
|
log.Log(INFO, "doAction() START a.ProgName =", a.ProgName)
|
||||||
|
|
||||||
if (a.ActionType == widget.ToolkitInit) {
|
if a.ActionType == widget.ToolkitInit {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
args.go
2
args.go
|
@ -20,7 +20,7 @@ func init() {
|
||||||
full := "toolkit/nocui"
|
full := "toolkit/nocui"
|
||||||
short := "nocui"
|
short := "nocui"
|
||||||
|
|
||||||
NOW = log.NewFlag( "NOW", true, full, short, "temp debugging stuff")
|
NOW = log.NewFlag("NOW", true, full, short, "temp debugging stuff")
|
||||||
INFO = log.NewFlag("INFO", false, full, short, "normal debugging stuff")
|
INFO = log.NewFlag("INFO", false, full, short, "normal debugging stuff")
|
||||||
|
|
||||||
WARN = log.NewFlag("WARN", true, full, short, "bad things")
|
WARN = log.NewFlag("WARN", true, full, short, "bad things")
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,3 +1,3 @@
|
||||||
module go.wit.com/gui/toolkits/nocui
|
module go.wit.com/toolkits/nocui
|
||||||
|
|
||||||
go 1.21.4
|
go 1.21.4
|
||||||
|
|
10
stdin.go
10
stdin.go
|
@ -1,15 +1,15 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
|
||||||
"fmt"
|
|
||||||
"bufio"
|
"bufio"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
"strings"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
"go.wit.com/lib/widget"
|
"go.wit.com/widget"
|
||||||
)
|
)
|
||||||
|
|
||||||
func simpleStdin() {
|
func simpleStdin() {
|
||||||
|
@ -51,7 +51,7 @@ func simpleStdin() {
|
||||||
i, _ := strconv.Atoi(s)
|
i, _ := strconv.Atoi(s)
|
||||||
log.Log(NOW, "got input:", i)
|
log.Log(NOW, "got input:", i)
|
||||||
n := me.treeRoot.FindWidgetId(i)
|
n := me.treeRoot.FindWidgetId(i)
|
||||||
if (n != nil) {
|
if n != nil {
|
||||||
n.DumpWidget("found node")
|
n.DumpWidget("found node")
|
||||||
for i, s := range n.State.Strings {
|
for i, s := range n.State.Strings {
|
||||||
log.Warn("n.State.Strings =", i, s)
|
log.Warn("n.State.Strings =", i, s)
|
||||||
|
|
Loading…
Reference in New Issue