summaryrefslogtreecommitdiff
path: root/redo/zz_test.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-07-28 17:59:50 -0400
committerPietro Gagliardi <[email protected]>2014-07-28 17:59:50 -0400
commit0b82f37bcbf9c53392f8aa7309cf6a2c5b3e5375 (patch)
tree750b92e3ee67dc0acab91e121926befbc9d247b0 /redo/zz_test.go
parent286704beddf7a4b3bf5bcdfa7a7ea4e32110d7d3 (diff)
Added the basic Table interface. Now to implement it...
Diffstat (limited to 'redo/zz_test.go')
-rw-r--r--redo/zz_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/redo/zz_test.go b/redo/zz_test.go
index 5fc821e..327aec2 100644
--- a/redo/zz_test.go
+++ b/redo/zz_test.go
@@ -12,6 +12,18 @@ import (
var closeOnClick = flag.Bool("close", false, "close on click")
+type dtype struct {
+ Name string
+ Address string
+}
+var ddata = []dtype{
+ { "alpha", "beta" },
+ { "gamma", "delta" },
+ { "epsilon", "zeta" },
+ { "eta", "theta" },
+ { "iota", "kappa" },
+}
+
// because Cocoa hates being run off the main thread, even if it's run exclusively off the main thread
func init() {
flag.BoolVar(&spaced, "spaced", false, "enable spacing")
@@ -30,6 +42,12 @@ func init() {
done <- struct{}{}
return true
})
+ table := NewTable(reflect.TypeOf(ddata[0]))
+ table.Lock()
+ dq := table.Data().(*[]dtype)
+ *dq = ddata
+ table.Unlock()
+ t.Append("Table", table)
b := NewButton("There")
if *closeOnClick {
b.SetText("Click to Close")