diff options
| author | Pietro Gagliardi <[email protected]> | 2014-05-17 12:42:00 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-05-17 12:42:00 -0400 |
| commit | be56293e9c8fbef647048286bd23a0e5b13caac2 (patch) | |
| tree | 84be891d893c296e16fe593352ac0379acc24a7f /listbox_darwin.m | |
| parent | cc74fda9501b867860e9f09cdc86a2fef21adaea (diff) | |
Found a method in NSArrayController via Stack Overflow which lets me suppress selection-changing behavior on NSTableView inserts; use that on Listbox in Mac OS X. This means sysData.selectIndices() and its Mac OS X implementation can (and has) gone away, clearing TODOs on Windows and Unix by extension.
Diffstat (limited to 'listbox_darwin.m')
| -rw-r--r-- | listbox_darwin.m | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/listbox_darwin.m b/listbox_darwin.m index cce97a0..25bd83e 100644 --- a/listbox_darwin.m +++ b/listbox_darwin.m @@ -37,6 +37,10 @@ id makeListboxArray(void) ac = [NSArrayController new]; [ac setAutomaticallyRearrangesObjects:NO]; + // we don't want Cocoa to change the selection when items are inserted + // found via TODO_get_Stack_Overflow_link; not sure how I missed it the first time + [ac setSelectsInsertedObjects:NO]; + // TODO figure out how to inhibit this behavior on delete return ac; } @@ -136,8 +140,3 @@ intptr_t listboxLen(id listbox) { return fromNSInteger([toNSTableView(listbox) numberOfRows]); } - -void listboxDeselectAll(id listbox) -{ - [toNSTableView(listbox) deselectAll:listbox]; -} |
