I.S.,

Hence the "don't use in production" clause. That method starts at 1 every time the application is launched, so not the complete solution in my case, it was only there as a reference to incrementing a value (arguably for my own use). The idea would be to persist that number in the data model.

Regards,

Joshua Preston
[EMAIL PROTECTED]




On Mar 6, 2008, at 4:52 PM, I. Savant wrote:

- (void)awakeFromInsert
{
  static int tempID = 1;

  [super awakeFromInsert];
  self.employeeID = [NSNumber numberWithInt:tempID++];
}

What do you think will happen when the application is quit, then run
the next time? How will it remember the last tempID?

--
I.S.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to