Skip navigation.
 
mlRe: Quickly remove contents from NSArrayController
FROM : Kyle Sluder
DATE : Mon Mar 24 15:42:33 2008

On Mon, Mar 24, 2008 at 10:35 AM, Jeff LaMarche <<email_removed>> wrote:
> Doh! You're right if course. How about using removeSelectedIndexes:?
>  Should be faster than sorting the contents before removing them,


Hrm.  Why not try attacking this from the model end instead of the
controller end?  Since it only makes sense in this case for your
NSArrayController to be bound to an NSMutableArray (which I'm going to
assume is a property on an NSDocument subclass for this example), why
not use -[[myDocument mutableArrayValueForKey:@"theKey"]
setArray:[NSArray array]]?

--Kyle Sluder

Related mailsAuthorDate
mlQuickly remove contents from NSArrayController Martin Linklater Mar 24, 15:16
mlRe: Quickly remove contents from NSArrayController Jeff LaMarche Mar 24, 15:21
mlRe: Quickly remove contents from NSArrayController Martin Linklater Mar 24, 15:26
mlRe: Quickly remove contents from NSArrayController Jeff LaMarche Mar 24, 15:35
mlRe: Quickly remove contents from NSArrayController Kyle Sluder Mar 24, 15:42
mlRe: Quickly remove contents from NSArrayController Martin Linklater Mar 24, 23:15