I subclassed a Core Data entity Recipe with PPRecipe < NSManaged
object, and created accessors for the fields:

class PPRecipe < NSManagedObject
 attr_accessor :name, :desc, :type, :imagePath, :serves
end

but these fields now don't save or display correct after I create
objects, and restart the app for example.

The generated accessors are writing to ivars instead of the CoreData store.

What do I need to do to get accessors working for NSManagedObject attributes?


I think what you really need is either:
• an attr_dynamic to replicate the behavior of the @dynamic property getters in Objective-C, or, • an attr_coredata (or similar) call in HotCocoa which calls the primitive getters and setters.

-Ben
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to