summaryrefslogtreecommitdiff
path: root/reflect.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-13 13:31:35 -0600
committerJeff Carr <[email protected]>2024-01-13 13:31:35 -0600
commit5a3f4a87dc19195c1ad232b6fc83e2ee31d4d475 (patch)
tree79a68d9a42589cfbc017024443b8e5af4f442f19 /reflect.go
parente198e7809671e06f6cbc5bd3618b741c04d48e4d (diff)
move to SetPad(), SetMargin() and SetExpand()v1.1.2
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'reflect.go')
-rw-r--r--reflect.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/reflect.go b/reflect.go
index 783ecd0..6336b2b 100644
--- a/reflect.go
+++ b/reflect.go
@@ -1,10 +1,36 @@
package widget
+/*
+ widget is a low level package that just defines the gui package
+ interaction with the toolkits.
+
+ For simplicity, it seems to make sense to put type conversion functions
+ here for now
+*/
+
import (
"reflect"
"strconv"
)
+/*
+// TODO: this syntax or the other syntax?
+
+func convertString(val any) string {
+ switch v := val.(type) {
+ case bool:
+ n.B = val.(bool)
+ case string:
+ n.label = val.(string)
+ n.S = val.(string)
+ case int:
+ n.I = val.(int)
+ default:
+ log.Error(errors.New("Set() unknown type"), "v =", v)
+ }
+}
+*/
+
func GetString(A any) string {
if A == nil {
// log.Warn("getString() got nil")