summaryrefslogtreecommitdiff
path: root/stdin.go
diff options
context:
space:
mode:
Diffstat (limited to 'stdin.go')
-rw-r--r--stdin.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/stdin.go b/stdin.go
index dde5564..fc2f2e5 100644
--- a/stdin.go
+++ b/stdin.go
@@ -9,6 +9,7 @@ import (
"strings"
"go.wit.com/log"
+ "go.wit.com/toolkits/tree"
"go.wit.com/widget"
)
@@ -37,6 +38,7 @@ func simpleStdin() {
log.Println("Stack trace:")
debug.PrintStack()
me.myTree.SendToolkitPanic()
+ os.Exit(0)
return
}
}()
@@ -50,10 +52,10 @@ func simpleStdin() {
switch s {
case "l":
log.Log(NOW, "list widgets")
- me.treeRoot.ListWidgets()
+ tree.ListWidgets()
case "b":
log.Log(NOW, "show buttons")
- me.treeRoot.ShowButtons()
+ tree.ShowButtons()
case "g":
me.myTree.SendToolkitLoad("gocui")
case "a":
@@ -63,6 +65,7 @@ func simpleStdin() {
case "p":
debug.PrintStack()
me.myTree.SendToolkitPanic()
+ os.Exit(0)
return
case "q":
return
@@ -71,7 +74,7 @@ func simpleStdin() {
default:
i, _ := strconv.Atoi(s)
log.Log(NOW, "got input:", i)
- n := me.treeRoot.FindWidgetId(i)
+ n := tree.FindWidgetId(i)
if n != nil {
n.DumpWidget("found node")
for i, s := range n.State.Strings {