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
I am working from one of the numerous books in Obj C.
My question, which I have asked at another list, is about the method
init.
Firstly, here is the code, stripped somewhat of irrelevant
( hopefully ) code.
/* #import */
#import
#import
@interface Fraction : Object
{
On 11/07/2008, at 12:36 PM, Dale Jensen wrote:
I have the need to modify a menu item title, so I:
a) Added a tag to the menu item in IB (selected the menu item, then
went to the first "tab" of the Inspector, and added a number in the
"Tag" field. I tried both 99 and 1).
b) Added this cod
I have the need to modify a menu item title, so I:
a) Added a tag to the menu item in IB (selected the menu item, then
went to the first "tab" of the Inspector, and added a number in the
"Tag" field. I tried both 99 and 1).
b) Added this code to my function:
NSMenu *mainMenu = [NSApp ma
10 matches
Mail list logo