• 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
Modelling a small unchanging set of possibilities (Core Data)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Core Data, bindings and synchronizing.
  • Next by Date: Re: Running from DMG
  • Previous by thread: Re: Core Data, bindings and synchronizing.
  • Next by thread: How to intercept all events in a Carbon/Cocoa app?
  • Index(es):
    • Date
    • Thread