From e252945cb386312d9fb79b2fbe3179e4b1e40a62 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 21 Feb 2015 15:53:13 -0500 Subject: Implemented Table column names on all platforms. Updates #40. --- table_darwin.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'table_darwin.go') 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 { -- cgit v1.2.3