Re: a newbie question

2008-11-15 Thread Ken Thomases
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

RE : a newbie question

2008-11-11 Thread Etienne Guérard
You should derive your classes from NSObject, not from Object. You normally don't have to #include objc/Object.h. 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

Re: RE : a newbie question

2008-11-11 Thread Michael de Haan
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 objc/Object.h. Where did you find such an example? It is from Steve Kochan's book ...which is basically an introduction to Objective C.

RE : RE : a newbie question

2008-11-11 Thread Etienne Guérard
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 objc/Object.h. Where did you find

Re: RE : RE : a newbie question

2008-11-11 Thread Michael de Haan
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

Re: a newbie question

2008-11-11 Thread Paul Bruneau
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

Re: a newbie question

2008-11-11 Thread Michael de Haan
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

Re: Bindings - newbie question

2008-09-02 Thread Quincey Morris
On Sep 1, 2008, at 22:25, Oleg Krupnov wrote: What I do: From within MyDocument's windowControllerDidLoadNib message: [myController bind: @currMode toObject: self withKeyPath:@currMode options:nil]; I do not override bind, unbind etc. of MyController relying on the default implementation

Re: Bindings - newbie question

2008-09-02 Thread Oleg Krupnov
I have read the following thread: http://www.cocoabuilder.com/archive/message/cocoa/2008/6/27/211362 (the useful part of it) and mostly figured out the matter myself and coped to make my code work. I will now briefly set forth my understanding and appreciate if some more experienced colleague

Re: Another newbie question

2008-05-30 Thread Erik Buck
A better subjuct might have been How should I use interface objects to select command line arguments? or something like that. The current subject adds no value and will not help others search for information in the future. Having said that... One approach you might take (that will

Re: Re: newbie question: menu item appears when app runs, but is not visible in NIB

2008-05-29 Thread Paul Archibald
I am really a total newbie (3 or 4 days) with IB, so I have NO confidence that I can tell what is a bug yet. I barely understand what I am doing as yet. However, I should have done the IB run mode thing. I did not think of that. I just looked at it and it looks correct (no extra item). Go

Re: Another newbie question

2008-05-29 Thread Michael Vannorsdel
What I'd suggest is to assign each selection with a tag number in IB (or programatically if need be). Then in your code you can get the tag: int colorID = [[colorButton selectedItem] tag]; Assign each its corresponding ID as the tag like 4 for black, 1 for red, ect. On May 29, 2008, at

Re: fresh newbie question

2008-02-21 Thread Nir Soffer
On Feb 18, 2008, at 16:59, Mei Fang Liau wrote: I wrote a controller class inherited from NSObject, which contains a outlet with the main window (NSWindow) as the destination. This outlet is used to scan the main window's subviews and find all check boxes and store them in an array. Can I