summaryrefslogtreecommitdiff
path: root/common.go
diff options
context:
space:
mode:
Diffstat (limited to 'common.go')
-rw-r--r--common.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/common.go b/common.go
index 2d865bb..fa6527e 100644
--- a/common.go
+++ b/common.go
@@ -98,6 +98,12 @@ func (n *Node) AppendText(str string) {
sendAction(a)
}
+// THESE TWO FUNCTIONS ARE TERRIBLY NAMED AND NEED TO BE FIXED
+// 5 seconds worth of ideas:
+// Value() ?
+// Progname() Reference() ?
+
+// should get the value of the node
func (n *Node) GetText() string {
if (n.S != n.Text) {
newlog.Warn("GetText() is screwed up. TODO: fix this dumb crap")
@@ -110,6 +116,14 @@ func (n *Node) GetText() string {
return n.Text
}
+// should get the value of the node
+// myButton = myGroup.NewButton("hit ball", nil).SetName("HIT")
+// myButton.GetName() should return "HIT"
+// n = Find("HIT") should return myButton
+func (n *Node) GetName() string {
+ return n.Name
+}
+
/*
// string handling examples that might be helpful for normalizeInt()
isAlpha := regexp.MustCompile(`^[A-Za-z]+$`).MatchString