From a08bbaf04ff536e8fae3ab5396dc54c290945301 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 3 Jan 2024 13:37:03 -0600 Subject: all debug stuff moved to 'go.wit.com/gui/debugger' 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 --- common.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'common.go') 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 -- cgit v1.2.3