Re: Using an empty string as the default value for a Core Data attribute in the XCode modeller
Re: Using an empty string as the default value for a Core Data attribute in the XCode modeller
- Subject: Re: Using an empty string as the default value for a Core Data attribute in the XCode modeller
- From: mmalc crawford <email@hidden>
- Date: Wed, 5 Sep 2007 08:34:40 -0700
On Sep 5, 2007, at 3:33 AM, Frank Reiff wrote:
I simply unticked the "optional" checkbox and left the default value
field blank, thinking that this ought to do the trick..
Umm, no, that simply means that it becomes a required value.
My guess is that leaving the default value field blank means "no
default value" rather than "use the empty string as the default
value", but that will mean that I either have to programmatically
set the default value to @"" or need to test every time I read this
attribute whether it is null or contains a string. Both of those
seem to go against the grain of putting default values and
validation into the model rather than the code..
Is there any trick to use the modeler to supply @"" as a default
value?
Modify the model immediately after reading it from disk.
mmalc
_______________________________________________
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