diff options
| author | Jeff Carr <[email protected]> | 2021-10-31 12:20:20 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2021-10-31 12:20:20 -0500 |
| commit | ad3c3e8369ce6e62dbe9f8bacecf036d276dda8e (patch) | |
| tree | 8d9137889453bdd6cb82a54bf0f533bf11340183 | |
| parent | 9675bc19a65dd7cd00e05983ea72c35c2753026b (diff) | |
NODE: walking
Signed-off-by: Jeff Carr <[email protected]>
| -rw-r--r-- | entry.go | 13 | ||||
| -rw-r--r-- | window.go | 4 |
2 files changed, 15 insertions, 2 deletions
@@ -40,6 +40,19 @@ func (b *GuiBox) GetText(name string) string { return e.UiEntry.Text() } +func (n *Node) SetText(value string) error { + log.Println("gui.SetText() value =", value) + if (n.uiText == nil) { + n.uiText.SetText(value) + return nil + } + if (n.uiButton == nil) { + n.uiButton.SetText(value) + return nil + } + return nil +} + func SetText(box *GuiBox, name string, value string) error { if (box == nil) { return fmt.Errorf("gui.SetText() ERROR box == nil") @@ -77,9 +77,9 @@ func makeNode(parent *Node, title string, x int, y int) *Node { // panic("gui.makeNode() after NodeMap()") return &node } else { - panic("gui.makeNode() before Append()") + // panic("gui.makeNode() before Append()") parent.Append(&node) - panic("gui.makeNode() after Append()") + // panic("gui.makeNode() after Append()") } node.parent = parent return &node |
