Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ghall

macrumors 68040
Original poster
Jun 27, 2006
3,771
1
Rhode Island
Hey, I'm doing this tutorial ( http://developer.apple.com/cocoa/coredatatutorial/index.html ) and I'm stuck on Adding Custom Logic. I followed it exactly, and when I run my program, and add a "Release", my program locks up, and I have to quit out of Xcode to get out of it.

Here's what my CommitMessageMO.m looks like.

//
// CommitMessageMO.m
// Checkin
//
// Created by Graham Hall on 2/8/07.
// Copyright 2007 __MyCompanyName__. All rights reserved.
//

#import "CommitMessageMO.h"


@implementation CommitMessageMO
- (void)awakeFromInsert {
[self setValue:[NSDate date] forKey:"creationDate"];
}

@end

The bolded line had an error that prevented Xcode to build the program, which I fixed. Now the build succeeds, but, as I said before, the app locks up.
 

ghall

macrumors 68040
Original poster
Jun 27, 2006
3,771
1
Rhode Island
You need an @ in front of the key ie @"creationDate"

Thanks. I didn't see that.

EDIT: Okay, bear with me here, I'm new to this, but this is supposed to make today's date appear as the creation date, but it's not working. The app is no longer freezing, but it's not working either
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.