This is more of a application design question than anything else. The way I see it with what you have, you're going to need a "long switch
statement" somewhere. Maybe the cleanest way would be in a message you send yourself with a signature like:
- (ABPropertyID)recordPropertyFromMyEnum:(MyEnumType)property
Consider this: if the only enumerations you have line up one-for-one with an ABPropertyID
, why not just use ABPropertyID
instead?
greg
2010-02-24 22:47:51