Theocacao
Leopard
Design Element
Comment on "A Quick Objective-C 2.0 Tutorial: Part II"
by mmalc — Nov 05
So dot syntax, and setters, should work with properties, and @dynamic is useful in this case.

... as discussed in detail in the documentation -- in Managed Object Accessor Methods and Using Managed Objects...

I threw together a quick test app, but I initialized the NSManagedObject by calling init instead of using the usual CD initialization method. Obviously if you do that the accessors are not correctly added to the runtime.

The need to use the designated initialiser is stressed in Creating and Deleting Managed Objects, the class reference, and the Release Notes.

mmalc
Back to "A Quick Objective-C 2.0 Tutorial: Part II"
Design Element

Copyright © Scott Stevenson 2004-2015