Re: Subclassing add: of NSArraycontroller
Re: Subclassing add: of NSArraycontroller
- Subject: Re: Subclassing add: of NSArraycontroller
- From: ALEXander <email@hidden>
- Date: Thu, 23 Apr 2009 19:47:35 +0100
Thanks! I read that, but I obviously I did not understand it.
What I do now is not to call super and adding the object myself.
Works, but I have to set relationships myself. But I mostly need to do
that anyway.
Alexander.
On 23.04.2009, at 19:31, Kyle Sluder wrote:
On Thu, Apr 23, 2009 at 8:17 AM, ALEXander <email@hidden>
wrote:
In the renumbering routine, when I access [self arrangedobjects],
or even if
I do a new fetch on my managedObjectContext, the new object is not
there
yet. I tried all this:
From the documentation on -[NSArrayController add:], found at
http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/ApplicationKit/Classes/NSArrayController_Class/Reference/Reference.html#/
/apple_ref/doc/uid/20002042-DontLinkElementID_1
:
"Beginning with Mac OS X v10.4 the result of this method is deferred
until the next iteration of the runloop so that the error presentation
mechanism can provide feedback as a sheet."
So you can't expect that immediately after calling -add: that anything
will have changed. Maybe you can instead override -newObject.
--Kyle Sluder
_______________________________________________
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