NSArrayController content modification vs addObject:
NSArrayController content modification vs addObject:
- Subject: NSArrayController content modification vs addObject:
- From: Aurélien Hugelé <email@hidden>
- Date: Thu, 02 Mar 2006 11:18:11 +0100
Hi list !
myArrayController is bound to MyController, with
keypath:@"someObjects" (someObjects accesors is -(NSMutableArray*)
someObjects)
What is the difference between [myArrayController addObject:anObject]
and [[myArrayController content] addbject:anObject] ?
i have noticed that using [myArrayController addObject:anObject] is
VERY slow in my case, because this method refreshes the "content" of
the array controller by using KVC, the -(NSMutableArray*)someObjects
methods is called, and it is a quite slow method (suppose i have to
get datas from a slow server)
using [[myArrayController content] addbject:anObject] is very fast
because the content of the array controller is not refreshed (-
(NSMutableArray*)someObjects methods is NOT called again)
why does addObject: method of NSArrayController needs to refresh its
content again using valueForKey:@"someObjects" again ? the content of
the array controller is *already* in the NSArrayController (it is
almost equal to arrangedObjects...) ?
thanks
Aurelien
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden