Re: Core Data validateForUpdate
Re: Core Data validateForUpdate
- Subject: Re: Core Data validateForUpdate
- From: Matthew Lindfield Seager <email@hidden>
- Date: Tue, 22 Dec 2009 15:41:43 +1100
On Tuesday, December 22, 2009, Gerriet M. Denkmann <email@hidden> wrote:
> What I ended up was: subclassing NSArrayController and overriding "newObject" to return a new object prefilled with some some nice values, including setting my uniqueKey to "undefined", "undefined_1", "undefined_2", etc.
> This will break of course if the user (out of sheer perversity) has already created an "undefined_4".
Plus 1. I've done something similar in the past. My approach was to
see if "Untitled" was already taken, if so try "Untitled 2", etc. From
memory I kept going until 20 (a number all but the most perverse user
wouldn't reach in my case). If "Untitled 20" (& everything preceding)
was taken it got named with a date stamp, "Untitled 2009122215353803"
for example.
Regards,
Matt
_______________________________________________
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