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
Paul...thank you for that info. I was not aware there is a specific
OBJ-C mailing list, but will go there, for a few chapters, at any
rate!! :-)
Michael.
On Nov 11, 2008, at 12:44 PM, Paul Bruneau wrote:
On Nov 11, 2008, at 3:16 PM, Etienne Guérard wrote:
Maybe it's an illustrative exam
On Nov 11, 2008, at 3:16 PM, Etienne Guérard wrote:
Maybe it's an illustrative example, not a real one.
Anyway you'd better stick to NSObject.
Object is used to implement the metaclass class hierachy inside the
ObjC runtime.
You normally don't play with it. ;)
It is a real example, but it i
On Nov 11, 2008, at 12:16 PM, Etienne Guérard wrote:
Maybe it's an illustrative example, not a real one.
Anyway you'd better stick to NSObject.
Object is used to implement the metaclass class hierachy inside the
ObjC runtime.
You normally don't play with it. ;)
thanks for your input. I a
e la part de Michael de Haan
Date: mar. 11/11/2008 19:32
À: cocoa-dev@lists.apple.com
Objet : Re: RE : a newbie question
On Nov 11, 2008, at 9:21 AM, Etienne Guérard wrote:
> You should derive your classes from NSObject, not from Object.
> You normally don't have to #include .
>
On Nov 11, 2008, at 9:21 AM, Etienne Guérard wrote:
You should derive your classes from NSObject, not from Object.
You normally don't have to #include .
Where did you find such an example?
It is from Steve Kochan's book ...which is basically an introduction
to Objective C.
The alloc
You should derive your classes from NSObject, not from Object.
You normally don't have to #include .
Where did you find such an example?
The alloc method basically does a calloc of the appropriate instance size.
The init method of NSObject does nothing.
It's good practive to always call an init me