Bindings Blues
Bindings Blues
- Subject: Bindings Blues
- From: Mark Davis <email@hidden>
- Date: Thu, 29 Jul 2004 11:00:54 -0300
My application controller is holding an array _groups. Each group in
the _groups array has a contents array which holds all the objects
stored inside the group.
So when I went to remove an object from one of my groups I simply did this:
[self willChangeValueForKey:@"groups"];
[[[[self groups] objectAtIndex:[groupTable selectedRow]] contents]
removeObjectAtIndex:[contentsTable selectedRow]];
[self didChangeValueForKey:@"groups"];
The first thing I'll hear will probably be that my contents array
isn't mutable. It's an NSMutableArray and I can definitely work with
it.
Whenever I remove the last object in the contents I get an error:
*** -[NSCFArray objectAtIndex:]: index (0) beyond bounds
This error is only displayed when I'm removing the last object from
contents (by last I mean the object that is the farthest bottom in the
list -- not the only object left).
----
Mark Davis
Icecold Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.