Posts Tagged ‘key value coding’

Refactoring DBObject, Part 4

The keyPath I talked about last time is just to useful to wait on. So I added it. This lets you easly get values from DBObjects within other DBObjects. So on the death date example from last time.
return (DateTime)((DBObject)valueForKey(“user_info”)).valueForKey(“column_death_date”);
is replaced with
return (DateTime)valueForKeyPath(“user_info.column_death_date”);

Read the rest of this entry »