From 58b553bc8665d585271c85e0066cdbede645e6fb Mon Sep 17 00:00:00 2001 From: nico Date: Thu, 30 Aug 2001 12:37:27 +0000 Subject: [PATCH] Regenerated git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10810 72102866-910b-0410-8b05-ffd578937521 --- Documentation/gsdoc/NSObject.html | 272 ++++++++++++++++++++++++++++++ 1 file changed, 272 insertions(+) diff --git a/Documentation/gsdoc/NSObject.html b/Documentation/gsdoc/NSObject.html index 269d64350..0034d3133 100644 --- a/Documentation/gsdoc/NSObject.html +++ b/Documentation/gsdoc/NSObject.html @@ -10,6 +10,8 @@
Richard Frith-Macdonald
+
Nicola Pero +

Version: $Revision$

Date: $Date$

@@ -20,6 +22,73 @@


+

+ + NSObject is the root class (a root class is + a class with no superclass) of the gnustep base library + class hierarchy, so all classes normally inherit from + NSObject. There is an exception though: + NSProxy (which is used for remote messaging) + does not inherit from NSObject. +

+ +

+ + Unless you are really sure of what you are doing, all + your own classes should inherit (directly or indirectly) + from NSObject (or in special cases from + NSProxy). NSObject provides + the basic common functionality shared by all gnustep + classes and objects. +

+ +

+ + The essential methods which must be implemented by all + classes for their instances to be usable within gnustep + are declared in a separate protocol, which is the + NSObject protocol. Both + NSObject and NSProxy conform to + this protocol, which means all objects in a gnustep + application will conform to this protocol (btw, if you + don't find a method of NSObject you are + looking for in this documentation, make sure you also + look into the documentation for the NSObject + protocol). +

+ +

+ + Theoretically, in special cases you might need to + implement a new root class. If you do, you need to make + sure that your root class conforms (at least) to the + NSObject protocol, otherwise it will not + interact correctly with the gnustep framework. Said + that, I must note that I have never seen a case in which + a new root class is needed. +

+ +

+ + NSObject is a root class, which implies that + instance methods of NSObject are treated in + a special way by the Objective-C runtime. This is an + exception to the normal way messaging works with class + and instance methods: if the Objective-C runtime can't + find a class method for a class object, as a last resort + it looks for an instance method of the root class with + the same name, and executes it if it finds it. This + means that instance methods of the root class (such as + NSObject) can be performed by class objects + which inherit from that root class ! This can only + happen if the class doesn't have a class method with the + same name, otherwise that method - of course - takes the + precedence. Because of this exception, + NSObject's instance methods are written in + such a way that they work both on NSObject's + instances and on class objects. +

+

Instance Variables