From: Pierce T. W. I. <pi...@tw...> - 2008-01-03 19:59:43
|
On Jan 3, 2008, at 12:28 AM, Rich Warren wrote: > Hi, > > I'm working on a RubyCocoa Core Data project. In that project, I'm > trying to subclass NSManagedObject to return specific values for the > count attribute. Count otherwise behaves like any other Core Data > attribute. > > The following Objective C code works fine. It correctly returns the > number of posts associated with the posts relationship. The sample Core Data code has some call in it that builds generic KVC wrappers for all of the attributes declared in the model. Since it does this generally _after_ the class has been loaded and ruby lets you redefine methods at will, its trashing your implementation. If you comment out the line that builds those wrappers, you'll be good to go. Pierce |