Error inserting object
Error inserting object
- Subject: Error inserting object
- From: Steve Steinitz <email@hidden>
- Date: Tue, 26 Jun 2007 19:20:45 +1000
Hello,
I've tried for several hours to achieve a seemingly simple thing. I
have a core data app with a table view and a search field. With a
non-empty search predicate, I want to be able to duplicate an existing
object and have the new, duplicate-object be visible and selected --
even though its not rightly found by the predicate.
Where I am stuck is, that once I do:
[arrayController setClearsFilterPredicateOnInsertion: NO]
any attempt to add an object to the array controller, that doesn't
match the predicate, by, say,
[arrayController addObject: object]
or even, getting back to basics,
[arrayController insert: self]
throws an exception, caught by the NSApplication, I think, which
logs this error message:
Error inserting object at arranged object index N
It doesn't help to disable the auto-selection options:
selectsInsertedObjects, preservesSelection, avoidsEmptySelection.
By the way, I'm using an NSArrayController subclass based on mmalc's
excellent FilteringController example. In my optimism, I believe that
once I can get around the exception, mmalc's 'newObject' should be
visible and that I should be able to select it.
A previous poster asked about this exception back in 2005 but didn't
get any takers.
Is this a candidate for bugreporter or... ?
Thanks,
Steve
_______________________________________________
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