• 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
Enums, Bindings, CoreData & Localization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Enums, Bindings, CoreData & Localization


  • Subject: Enums, Bindings, CoreData & Localization
  • From: Daniel Jalkut <email@hidden>
  • Date: Sun, 1 May 2005 13:30:55 -0700


I'm converting my nascent bindings-enabled project to a CoreData/ Bindings app.


This process is forcing me to rethink how I've managed one attribute in particular. It was already messy in bindings and my CoreData modeling has forced me to question what the best way to handle this type of situation is.

The attribute in question is a "units" attribute that corresponds to various measures of time (seconds, minutes, hours, days, etc). Currently, it's stored as a enum integer, and translated into a "description" for the UI by a getter and setter that take strings (localized) and translate them back into enum integers (e.g. setUnitsDescription, unitsDescription).

Assuming I keep the base value as an integer (good idea, or should I just switch to a "localization key string"?), how does the "string format" version of this attribute fit into an object model? Is it a fetched value? A transient value? Both? I'm thinking it's not a fetched value because it's not liable to dynamically change.

Or does the presentation of the model object belong outside of the model, and therefore better suited to something like a bindings value transformation?

Daniel

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Test ignore plz
  • Next by Date: Re: Which tool would you use to track down a signal 10 (SIGBUS)?
  • Previous by thread: Test ignore plz
  • Next by thread: Re: Which tool would you use to track down a signal 10 (SIGBUS)?
  • Index(es):
    • Date
    • Thread