summaryrefslogtreecommitdiff
path: root/textbox.go
diff options
context:
space:
mode:
Diffstat (limited to 'textbox.go')
-rw-r--r--textbox.go16
1 files changed, 10 insertions, 6 deletions
diff --git a/textbox.go b/textbox.go
index bc5c902..ffc2812 100644
--- a/textbox.go
+++ b/textbox.go
@@ -29,14 +29,18 @@ func (tk *guiWidget) forceSizes(r *rectType) {
tk.force.h1 = r.h1
}
-func (callertk *guiWidget) prepTextbox() {
+func initTextbox() {
if me.textbox.tk == nil {
// should only happen once
me.textbox.tk = makeNewFlagWidget(me.textbox.wId)
// me.textbox.tk.dumpWidget("init() textbox")
}
+}
+
+func (callertk *guiWidget) prepTextbox() {
+ initTextbox()
if me.textbox.tk == nil {
- log.Log(GOCUI, "showTextbox() Is Broken")
+ log.Log(GOCUI, "prepTextbox() Is Broken")
return
}
@@ -51,14 +55,14 @@ func (callertk *guiWidget) prepTextbox() {
me.textbox.callerTK = callertk
- showTextbox(callertk.String())
+ // showTextbox(callertk.String())
}
-func showTextbox(callertk string) {
+func showTextbox(callers string) {
// tk := me.textbox.tk
// me.textbox.tk.dumpWidget("after sizes")
- me.textbox.tk.Show() // actually makes the gocui view. TODO: redo this
+ // me.textbox.tk.Show() // actually makes the gocui view. TODO: redo this
if me.textbox.tk.v == nil {
log.Info("wtf went wrong")
@@ -67,7 +71,7 @@ func showTextbox(callertk string) {
me.textbox.tk.setColorModal()
me.textbox.tk.v.Clear()
- cur := strings.TrimSpace(callertk)
+ cur := strings.TrimSpace(callers)
// log.Info("setting textbox string to:", cur)
me.textbox.tk.v.WriteString(cur)