• 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: Specify valid values for a Core Data attribute
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Specify valid values for a Core Data attribute


  • Subject: Re: Specify valid values for a Core Data attribute
  • From: Sean McBride <email@hidden>
  • Date: Fri, 19 Aug 2011 11:45:07 -0400
  • Organization: Rogue Research Inc.

On Fri, 19 Aug 2011 15:40:55 +0200, Brian Norh said:

>One of the problems with this approach is that it doesn't work if the
>application is localized it into a different language. Then the word
>which indicates the state is stored differently depending on the
>current language. I need to save the selection in a language
>independent manner.

Yes, you do.  Either an enum as Martin said, or a string with unique values, like com.brian.bugstate.open, etc.  integer enums have the advantage of mapping to 'tag's in an NSPopupButton, and you can then specify min and max values in your xcdatamodel.

>answered then a link to that thread or even a let-me-google-it-for-you
>would be helpful.

You should also read about 'key value validation'.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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

References: 
 >Specify valid values for a Core Data attribute (From: Brian Norh <email@hidden>)

  • Prev by Date: Re: Strange NSFileManager file replacement issue
  • Next by Date: Re: NSData & Mime Types...
  • Previous by thread: Re: Specify valid values for a Core Data attribute
  • Next by thread: Scripting Bridge header file problem
  • Index(es):
    • Date
    • Thread