From: Rich W. <rw...@gm...> - 2008-01-05 07:46:27
|
Pierce, Thanks for the reply. I assume you're talking about the following line from my application delegate: OSX::CoreData.define_wrapper(@managedObjectModel) The only problem is, I want it to build the wrappers for all the other attributes. I suppose I could re-define the method after that call-- but that sounds like a bother. It's probably best to just leave that bit in Objective C (though, I was trying to see how far I could push this). Thanks again. -Rich- On Jan 3, 2008, at 9:59 AM, Pierce T. Wetter III wrote: > > 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 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |