• 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: Fetch request problem with core data relationship and NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fetch request problem with core data relationship and NSTableView


  • Subject: Re: Fetch request problem with core data relationship and NSTableView
  • From: Felix Franz <email@hidden>
  • Date: Fri, 15 Jun 2007 18:32:12 +0200

On Jun 15, 2007, at 6:08 PM, Danny Callanan wrote:

<SNIP>
- (void) awakeFromInsert
{
NSManagedObjectContext *moc = [self managedObjectContext];
NSFetchRequest *request = [[[NSFetchRequest alloc] init] autorelease];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Currency" inManagedObkectContext:moc];
[request setEntity:entity];
NSError *error = nil;
NSArray *tempArray = [moc executeFetchRequest:request error:&error];
[self setToCurrency:[tempArray lastObject]];
}

You have to call [super awakeFromInsert] before your own code (as described in the documentation for NSManagedObject). Just a shot in the dark ...



Cheers,

felix



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >RE: Fetch request problem with core data relationship and NSTableView (From: "Danny Callanan" <email@hidden>)

  • Prev by Date: dynamically resizing NSTable's rows and the field editor at the same time
  • Next by Date: Re: Core Data Beginner Question
  • Previous by thread: RE: Fetch request problem with core data relationship and NSTableView
  • Next by thread: Re: Fetch request problem with core data relationship and NSTableView
  • Index(es):
    • Date
    • Thread