Re: What's with these redundant methods ?
Re: What's with these redundant methods ?
- Subject: Re: What's with these redundant methods ?
- From: Jonathan Hendry <email@hidden>
- Date: Tue, 22 Apr 2003 22:48:40 -0400
On Tuesday, April 22, 2003, at 05:45 PM, Chris Hanson wrote:
At 9:02 AM -0700 4/22/03, MarketLogix Developer wrote:
Well, true I do not implement those but Object from the ObjC runtime
does implement
respondsTo: and methodFor: and any class that I implement will
inherit from Object and
so inherit these.
Not true. (Unless I misunderstand what you're saying.)
If you write
@interface Foo
{ }
@end
you've declared a new root class, not a subclass of NSObject or Object.
Hm. The way I remember it, if you didn't specify a superclass, your
class was automatically made a descendent of Object. (This would
have been in the 2.x days when I learned that. If I'm remembering
correctly, that is.)
Obviously, now you can create multiple root classes, and it's been
possible
since at least the release of EOF, which added at least NSObject and
EOFault.
Perhaps Objective-C was modified along the way? Maybe the
automatic Object subclass thing was an early Stepstone feature that
NeXT got rid of when they added Protocols, which would facilitate
multiple root classes.
Somebody dig out their old Brad Cox ObjC book, or Pinson and Weiner and
check if they have anything to say...
--
Jonathan W. Hendry NeXTSTEP/OpenStep/Cocoa
email@hidden programmer in Connecticut
Hire Me! MSCS student, U. New Haven
_______________________________________________
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.