diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-20 21:43:28 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-20 21:43:28 -0400 |
| commit | e845fcbf78a0f170e48e2383bd6a60eee68064d0 (patch) | |
| tree | fd7bc383ca3bb7ceb40839b5fbc33de7c1a5c3f0 /redo/table_darwin.m | |
| parent | 6a0d1166d98c8f379fca1cb1a039959994ff9f96 (diff) | |
Implemented Table.OnSelected() on Mac OS X.
Diffstat (limited to 'redo/table_darwin.m')
| -rw-r--r-- | redo/table_darwin.m | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/redo/table_darwin.m b/redo/table_darwin.m index 5fdac83..a8c85be 100644 --- a/redo/table_darwin.m +++ b/redo/table_darwin.m @@ -17,7 +17,7 @@ @implementation goTableColumn @end -@interface goTableDataSource : NSObject <NSTableViewDataSource> { +@interface goTableDataSource : NSObject <NSTableViewDataSource, NSTableViewDelegate> { @public void *gotable; } @@ -63,6 +63,11 @@ goTableDataSource_toggled(self->gotable, (intptr_t) row, colnum, [value boolValue]); } +- (void)tableViewSelectionDidChange:(NSNotification *)note +{ + tableSelectionChanged(self->gotable); +} + @end id newTable(void) @@ -134,6 +139,7 @@ void tableUpdate(id t) [toNSTableView(t) reloadData]; } +// also sets the delegate void tableMakeDataSource(id table, void *gotable) { goTableDataSource *model; @@ -141,6 +147,7 @@ void tableMakeDataSource(id table, void *gotable) model = [goTableDataSource new]; model->gotable = gotable; [toNSTableView(table) setDataSource:model]; + [toNSTableView(table) setDelegate:model]; } // -[NSTableView sizeToFit] does not actually size to fit |
