Re: Simple question
Re: Simple question
- Subject: Re: Simple question
- From: email@hidden
- Date: Thu, 22 Apr 2010 09:59:27 -0600
Try this:
NSNumber *fieldOne = [managedObject valueForKey:@"key1"];
NSNumber *fieldTwo = [managedObject valueForKey:@"key2"];
NSNumber *fieldThree = [managedObject valueForKey:@"key3"];
NSNumber *answer;
if (fieldTwo > 0) {
answer = ((fieldTwo - fieldOne) + fieldThree);
[self.managedObject setValue:[answer intValue] forKey:@"key4"];
}
-koko
_______________________________________________
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