• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using an empty string as the default value for a Core Data attribute in the XCode modeller
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Using an empty string as the default value for a Core Data attribute in the XCode modeller
      • From: Frank Reiff <email@hidden>
References: 
 >Using an empty string as the default value for a Core Data attribute in the XCode modeller (From: Frank Reiff <email@hidden>)

  • Prev by Date: Re: [ANN] RegexKit - An Objective-C Framework for Regular Expressions Using the PCRE Library
  • Next by Date: Re: Nested binding question
  • Previous by thread: Re: Using an empty string as the default value for a Core Data attribute in the XCode modeller
  • Next by thread: Re: Using an empty string as the default value for a Core Data attribute in the XCode modeller
  • Index(es):
    • Date
    • Thread