summaryrefslogtreecommitdiff
path: root/table_darwin.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2015-02-21 15:53:13 -0500
committerPietro Gagliardi <[email protected]>2015-02-21 15:53:31 -0500
commite252945cb386312d9fb79b2fbe3179e4b1e40a62 (patch)
tree68bb701867e568176f2ab44914662657e5b3159f /table_darwin.go
parent23e6739dfabd61fd732d9b78e13a55aeaa7c2c2d (diff)
Implemented Table column names on all platforms. Updates #40.
Diffstat (limited to 'table_darwin.go')
-rw-r--r--table_darwin.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/table_darwin.go b/table_darwin.go
index 26418b6..1bfbe74 100644
--- a/table_darwin.go
+++ b/table_darwin.go
@@ -31,7 +31,11 @@ func finishNewTable(b *tablebase, ty reflect.Type) Table {
// also sets the delegate
C.tableMakeDataSource(t.id, unsafe.Pointer(t))
for i := 0; i < ty.NumField(); i++ {
- cname := C.CString(ty.Field(i).Name)
+ colname := ty.Field(i).Tag.Get("uicolumn")
+ if colname == "" {
+ colname = ty.Field(i).Name
+ }
+ cname := C.CString(colname)
coltype := C.colTypeText
editable := false
switch {