So far, nobody that I've seen has pointed out the specific error in
the code:
On Nov 10, 2008, at 9:00 PM, Michael wrote:
Fraction *myFraction;
myFraction= [Fraction alloc];
myFraction= [Fraction init]; /* ??? */
You are calling init on the class Fraction, not on the instance that
you've allocated. The last line should have been written as:
myFraction = [myFraction init];
although, as mentioned, it's customary to always initialize the
allocated instance within the same expression where it was allocated,
with this pattern:
myFraction = [[Fraction alloc] init];
Cheers,
Ken
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]