Re: Specify valid values for a Core Data attribute
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