Should not use mogenerator in Mac OS 10.5+ ?
Should not use mogenerator in Mac OS 10.5+ ?
- Subject: Should not use mogenerator in Mac OS 10.5+ ?
- From: Jerry Krinock <email@hidden>
- Date: Sat, 4 Oct 2008 16:11:41 -0700
When developing NSManagedObjects for Mac OS 10.4, after about 25 trips
to Xcode's menu Design > Data Model > Copy Method XXXX-tions to
Clipboard, my wrist got sore and I started using mogenerator [1].
Now, developing for Mac OS X 10.5+, I read that "On Mac OS X v10.5,
Core Data dynamically generates efficient public and primitive get and
set attribute accessor methods and relationship accessor methods for
managed object classes."
So, I don't ^need^ mogenerator, although I still may want to use it in
order to get type checking and generate code needed to avoid compiler
warnings. And although the "dynamically" generated methods are
"efficient", I assumed that they are still not as efficient as a hard-
coded method. But then, further down, in two highlighted "dire
warning" boxes, I read ...
"Important: You are strongly encouraged to use dynamic properties
(that is, properties whose implementation you specify as @dynamic)
instead of creating custom implementations for standard or primitive
accessor methods."
But I don't see any reasons given. Paradoxically these boxes seemed
to be followed by instructions detailing how to do what was just
recommended against doing [3], including code examples of standard
accessors which look like what I get out of mogenerator.
My questions: Am I being "strongly encouraged" to ^not^ use
mogenerator in a 10.5+ app? Why?
Thanks,
Jerry Krinock
[1] http://rentzsch.com/code/mogenerator_v1.5 (Be sure to use the
installer, don't just build the tool.)
[2] In "Core Data Programming Guide" > "Managed Object Accessor Methods"
http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdAccessorMethods.html#/
/apple_ref/doc/uid/TP40002154
[3] This "Well, if you insist on hanging yourself.." idiom is familiar
to me in reading Apple documentation.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden