Re: Should not use mogenerator in Mac OS 10.5+ ?
Re: Should not use mogenerator in Mac OS 10.5+ ?
- Subject: Re: Should not use mogenerator in Mac OS 10.5+ ?
- From: "Sean McBride" <email@hidden>
- Date: Sun, 5 Oct 2008 22:50:02 -0400
Jerry Krinock (email@hidden) on 2008-10-4 7:11 PM said:
>So, I don't ^need^ mogenerator, although I still may want to use it
Jerry,
I have been using mogenerator, and have asked myself the same question as you.
I have found the following things about it most useful:
1) when you change your xcdatamodel, running mogenerator is much easier
and less error prone than using Xcode's 'copy declarations/
implementations' feature over and over and over.
2) it adds the newInManagedObjectContext: method which is more readable
than repeating initWithEntity:insertIntoManagedObjectContext all the time.
3) it allows you to specify, in the userInfo dict, the type of a
transformable attribute. This way, accessor declarations will use
NSColor (for example) instead of just id.
4) for scalar types like 'double', it also creates accessors that take
'double' instead of NSNumber.
On the other hand, as Ben stated, some of the accessor code it generates
is entirely unnecessary and less efficient (at runtime). Worse, some of
the code it generates is incorrect. See this recent thread:
<http://www.cocoabuilder.com/archive/message/cocoa/2008/9/24/218788>
Hopefully Jonathan will soon fix mogenerator.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Mac Software Designer Montréal, Québec, Canada
_______________________________________________
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