diff options
| author | Pietro Gagliardi <[email protected]> | 2014-07-30 12:34:54 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-07-30 12:34:54 -0400 |
| commit | c0473db73c11927144f79bb69d01a290753b5de0 (patch) | |
| tree | 4e56aacdf5aa9129f77ebd47553a4cecb6207748 /redo/table_darwin.go | |
| parent | 4740f72efb09042abc3b0577044e720bcc36dcb2 (diff) | |
Ported the new Control setup to Mac OS X.
Diffstat (limited to 'redo/table_darwin.go')
| -rw-r--r-- | redo/table_darwin.go | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/redo/table_darwin.go b/redo/table_darwin.go index 206820a..8417afe 100644 --- a/redo/table_darwin.go +++ b/redo/table_darwin.go @@ -12,24 +12,20 @@ import ( import "C" type table struct { - *widgetbase + *scrolledcontrol *tablebase - - // TODO kludge - table C.id } func finishNewTable(b *tablebase, ty reflect.Type) Table { id := C.newTable() t := &table{ - widgetbase: newWidget(C.newScrollView(id)), - tablebase: b, - table: id, + scrolledcontrol: newScrolledControl(id), + tablebase: b, } - C.tableMakeDataSource(t.table, unsafe.Pointer(t)) + C.tableMakeDataSource(t.id, unsafe.Pointer(t)) for i := 0; i < ty.NumField(); i++ { cname := C.CString(ty.Field(i).Name) - C.tableAppendColumn(t.table, cname) + C.tableAppendColumn(t.id, cname) C.free(unsafe.Pointer(cname)) // free now (not deferred) to conserve memory } return t @@ -41,7 +37,7 @@ func (t *table) Unlock() { // not sure about this one... t.RLock() defer t.RUnlock() - C.tableUpdate(t.table) + C.tableUpdate(t.id) } //export goTableDataSource_getValue |
