summaryrefslogtreecommitdiff
path: root/basicEntry.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-17 21:46:50 -0600
committerJeff Carr <[email protected]>2024-01-17 21:46:50 -0600
commit32fe455bb5c75b756ca0ff7e2a5d076a30978db4 (patch)
tree252a5e804d86d78a41cdca4f83b460baee71bfb3 /basicEntry.go
parent751b6059c0432ede8de32656b777196cfdd6adaf (diff)
now should work without needed to actually displayv0.12.6
a nice improvement. actual toolkit widgets arent' actually needed. It's faster and can run in the dark autotypist compiles and runs Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'basicEntry.go')
-rw-r--r--basicEntry.go16
1 files changed, 10 insertions, 6 deletions
diff --git a/basicEntry.go b/basicEntry.go
index 6dab1dc..29a0dd8 100644
--- a/basicEntry.go
+++ b/basicEntry.go
@@ -25,6 +25,7 @@ type BasicEntry struct {
Custom func()
}
+/*
func (n *BasicEntry) Get() string {
return n.value
}
@@ -37,6 +38,7 @@ func (n *BasicEntry) Set(value string) *BasicEntry {
n.value = value
return n
}
+*/
func (n *BasicEntry) Enable() {
log.Log(INFO, "BasicEntry.Enable()")
@@ -52,11 +54,13 @@ func (n *BasicEntry) Disable() {
}
}
-func (n *BasicEntry) SetLabel(value string) *BasicEntry {
- log.Log(INFO, "BasicEntry.SetLabel() =", value)
- if (n.l != nil) {
- n.l.Set(value)
- }
+func (n *BasicEntry) String() string {
+ log.Log(INFO, "BasicEntry.SetLabel() =", n.v.String())
+ return n.v.String()
+}
+
+func (n *BasicEntry) SetLabel(s string) *BasicEntry {
+ n.l.SetText(s)
return n
}
@@ -70,7 +74,7 @@ func NewBasicEntry(p *gui.Node, name string) *BasicEntry {
d.l = p.NewLabel(name)
d.v = p.NewEntryLine("")
d.v.Custom = func() {
- d.value = d.v.GetText()
+ d.value = d.v.String()
log.Log(INFO, "BasicEntry.Custom() user changed value to =", d.value)
if d.Custom != nil {
d.Custom()