Re: Force a NSArrayController to fetch ?
Re: Force a NSArrayController to fetch ?
- Subject: Re: Force a NSArrayController to fetch ?
- From: Eric MORAND <email@hidden>
- Date: Tue, 14 Aug 2007 23:04:07 +0200
Here is the code I use to create and configure my array controller :
NSArrayController * brandsArrayController = [[NSArrayController
alloc] init];
[brandsArrayController setManagedObjectContext:aContext];
[brandsArrayController setEntityName:@"Brand"];
[brandsArrayController fetch:nil];
NSLog (@" arrangedObjects = %@", [brandsArrayController
arrangedObjects]);
As you can see, the controller is configured in entity mode (Brand).
There are currently 6 brands in aContext but "arrangedObjects"
returns nil.
What is stranger is that if I add...
[brandsArrayController insert:self];
...before the NSLog line, "arrangedObjects" still returns nil.
Eric.
Le 14 août 07 à 22:46, mmalc crawford a écrit :
On Aug 14, 2007, at 1:12 PM, Eric MORAND wrote:
Is there a way to force a NSArrayController to populate itself, to
fetch its content ?
I've tried the "fetch:" method but it doesn't work.
In what sense does it "not work"?
How is it configured?
What results do you get?
mmalc
_______________________________________________
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