Skip navigation.
 
mlEnums, Bindings, CoreData & Localization
FROM : Daniel Jalkut
DATE : Sun May 01 22:30:55 2005

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

Related mailsAuthorDate
No related mails found.