Overriding methods
Overriding methods
- Subject: Overriding methods
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Sun, 24 Mar 2002 20:17:03 +0100
A subclass may override methods of its superclass. If it chooses not
to, the superclass method is used. Correct?
So, NSMutableArray is a subclass of NSObject and inherits -init.
But when I use [ [ NSMutableArray alloc ] init ] I get no error message
like:
"Please use initWithCapacity:", and it almost works - but only almost.
Should not NSMutableArray either override the inherited init-method in
a documented way (e.g. with initWithCapacity: 0), or create an error
message and have the non-usability of this method documented?
Same with NSButtonCell setBezelStyle and its superclass NSActionCell
setBezeled.
Generally: should not the documentation clearly state (when not totally
obvious) the function of inherited methods?
Gerriet.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.