• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Force a NSArrayController to fetch ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Force a NSArrayController to fetch ?
      • From: mmalc crawford <email@hidden>
References: 
 >Force a NSArrayController to fetch ? (From: Eric MORAND <email@hidden>)
 >Re: Force a NSArrayController to fetch ? (From: mmalc crawford <email@hidden>)

  • Prev by Date: Re: Force a NSArrayController to fetch ?
  • Next by Date: Re: NSTextView scroll button problem
  • Previous by thread: Re: Force a NSArrayController to fetch ?
  • Next by thread: Re: Force a NSArrayController to fetch ?
  • Index(es):
    • Date
    • Thread