diff options
Diffstat (limited to 'basicEntry.go')
| -rw-r--r-- | basicEntry.go | 16 |
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() |
