Modelling a small unchanging set of possibilities (Core Data)
Modelling a small unchanging set of possibilities (Core Data)
- Subject: Modelling a small unchanging set of possibilities (Core Data)
- From: "Sean McBride" <email@hidden>
- Date: Mon, 12 Feb 2007 17:14:00 -0500
- Organization: Rogue Research
Hi all,
What is the recommended way to model a small unchanging set of possibilities?
For example, if I have an entity named "Particle" and an attribute named
"Kind" where the possibilities are "electron", "proton", "neutron", what
should I do? Should "Kind" be a string or number? The possibilities
for "Kind" will not change. I envision a UI of either a popup menu or a
set of radio buttons to select the "Kind".
I'm leaning towards using a number, and creating an enum for the various
possibilities. I'd guess I'd also need a transformer to convert enum<-
>string. Which makes me wonder if I should just use a string. But then
I've gone and hardcoded something in one language.
Thoughts? Thanks.
--
____________________________________________________________
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)
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