summaryrefslogtreecommitdiff
path: root/common.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-03 13:37:03 -0600
committerJeff Carr <[email protected]>2024-01-03 13:37:03 -0600
commita08bbaf04ff536e8fae3ab5396dc54c290945301 (patch)
tree79e0cd54b6d67ded948e6ce9caba68ab7aae5444 /common.go
parentd8f1107387af688e9b161a0c01dd70241741edba (diff)
all debug stuff moved to 'go.wit.com/gui/debugger'v0.9.9
I finally was able to clean out all the debugging code and make a clean, new GO debugger. It's quite nice I think. Well, it's useful to me at any rate. 2024 New Years wish: someone contributes code to improve it Signed-off-by: Jeff Carr <[email protected]>
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