Re: Strange _originalSnapshot error
Re: Strange _originalSnapshot error
- Subject: Re: Strange _originalSnapshot error
- From: Knut Lorenzen <email@hidden>
- Date: Sat, 18 Aug 2007 20:32:57 +0200
- Thread-topic: Strange _originalSnapshot error
Andrew Merenbach schrieb dereinst (am 18.08.2007 16:56 Uhr) via
email@hidden:
> I have an array controller that manages a log, and each time through
> my processing loop, started by the user, I want it to clear the
> previous entries. I do this with the following code:
>
> - (void)clearRolls {
> unsigned count = [[rollArrayController arrangedObjects] count];
> if (count > 0) {
> NSMutableIndexSet *indexSet = [[NSMutableIndexSet alloc]
> initWithIndexesInRange:NSMakeRange(0, count)];
> [rollArrayController removeObjectsAtArrangedObjectIndexes:indexSet];
> [indexSet release];
> }
> }
Hi Andrew,
FWIW: I've tested your code with one of my apps that uses an
NSArrayController and it runs fine. And it actually works, i.e. the
controlled NSTableView becomes empty.
Cheers,
Knut
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden