diff options
| author | Jeff Carr <[email protected]> | 2023-05-09 18:50:16 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-05-09 18:50:16 -0500 |
| commit | c36725fa90acc47fe5c0650f93540b5d65a126b6 (patch) | |
| tree | 287e41eecaa606aa0714e6e2126327c8aa83aa14 /textbox.go | |
| parent | b392c40969e105b00efa262042d647303d6fbc2c (diff) | |
simplify sendAction()
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'textbox.go')
| -rw-r--r-- | textbox.go | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -4,16 +4,12 @@ import ( "git.wit.org/wit/gui/toolkit" ) -func (n *Node) NewTextbox(name string) *Node { - newNode := n.newNode(name, toolkit.Textbox, func() { +func (parent *Node) NewTextbox(name string) *Node { + newNode := parent.newNode(name, toolkit.Textbox, func() { log(debugGui, "NewTextbox changed =", name) }) - var a toolkit.Action - a.ActionType = toolkit.Add - a.Name = name - a.Text = name - newaction(&a, newNode, n) - + a := newAction(newNode, toolkit.Add) + sendAction(a, newNode, parent) return newNode } |
