~ubuntu-branches/ubuntu/karmic/gnustep-base/karmic

« back to all changes in this revision

Viewing changes to Documentation/gsdoc/NSObject.html

  • Committer: Bazaar Package Importer
  • Author(s): Eric Heintzmann
  • Date: 2005-04-17 00:14:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050417001438-enf0y07c9tku85z1
Tags: 1.10.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html><head>
2
 
 <title>NSObject</title>
3
 
</head>
4
 
<body>
5
 
<a href ="NSNumberFormatter.html">[Previous] </a>
6
 
<a href ="Base.html">[Up] </a>
7
 
<a href ="NSPipe.html">[Next] </a>
8
 
<h1>NSObject</h1>
9
 
<h3>Authors </h3>
10
 
 <dl>
11
 
<dt><a href ="http://www.gnustep.org/developers/whoiswho.html">Richard Frith-Macdonald</a>
12
 
<dd>
13
 
<dt><a href ="http://www.gnustep.org/developers/whoiswho.html">Nicola Pero</a>
14
 
<dd>
15
 
</dl>
16
 
<p>Version: $Revision: 1.16 $</p>
17
 
<p>Date: $Date: 2001/12/12 14:10:13 $</p>
18
 
<h2><a name ="cont-0">NSObject</a></h2>
19
 
<h2><a name ="NSObject">NSObject</a></h2>
20
 
<p><b>Declared in: </b> Foundation/NSObject.h</p>
21
 
<p><b>Conforms to: </b> NSObject
22
 
</p>
23
 
<hr>
24
 
 
25
 
           <p>
26
 
 
27
 
             <code>NSObject</code> is the root class (a root class is
28
 
             a class with no superclass) of the gnustep base library
29
 
             class hierarchy, so all classes normally inherit from
30
 
             <code>NSObject</code>.  There is an exception though:
31
 
             <code>NSProxy</code> (which is used for remote messaging)
32
 
             does not inherit from <code>NSObject</code>.
33
 
           </p>
34
 
 
35
 
           <p>
36
 
 
37
 
             Unless you are really sure of what you are doing, all
38
 
             your own classes should inherit (directly or indirectly)
39
 
             from <code>NSObject</code> (or in special cases from
40
 
             <code>NSProxy</code>).  <code>NSObject</code> provides
41
 
             the basic common functionality shared by all gnustep
42
 
             classes and objects.
43
 
           </p>
44
 
 
45
 
           <p>
46
 
 
47
 
             The essential methods which must be implemented by all
48
 
             classes for their instances to be usable within gnustep
49
 
             are declared in a separate protocol, which is the
50
 
             <code>NSObject</code> protocol.  Both
51
 
             <code>NSObject</code> and <code>NSProxy</code> conform to
52
 
             this protocol, which means all objects in a gnustep
53
 
             application will conform to this protocol (btw, if you
54
 
             don't find a method of <code>NSObject</code> you are
55
 
             looking for in this documentation, make sure you also
56
 
             look into the documentation for the <code>NSObject</code>
57
 
             protocol).
58
 
           </p>
59
 
 
60
 
           <p>
61
 
 
62
 
             Theoretically, in special cases you might need to
63
 
             implement a new root class.  If you do, you need to make
64
 
             sure that your root class conforms (at least) to the
65
 
             <code>NSObject</code> protocol, otherwise it will not
66
 
             interact correctly with the gnustep framework.  Said
67
 
             that, I must note that I have never seen a case in which
68
 
             a new root class is needed.
69
 
           </p>
70
 
 
71
 
           <p>
72
 
 
73
 
             <code>NSObject</code> is a root class, which implies that
74
 
             instance methods of <code>NSObject</code> are treated in
75
 
             a special way by the Objective-C runtime.  This is an
76
 
             exception to the normal way messaging works with class
77
 
             and instance methods: if the Objective-C runtime can't
78
 
             find a class method for a class object, as a last resort
79
 
             it looks for an instance method of the root class with
80
 
             the same name, and executes it if it finds it.  This
81
 
             means that instance methods of the root class (such as
82
 
             <code>NSObject</code>) can be performed by class objects
83
 
             which inherit from that root class !  This can only
84
 
             happen if the class doesn't have a class method with the
85
 
             same name, otherwise that method - of course - takes the
86
 
             precedence.  Because of this exception,
87
 
             <code>NSObject</code>'s instance methods are written in
88
 
             such a way that they work both on <code>NSObject</code>'s
89
 
             instances and on class objects.
90
 
           </p>
91
 
 
92
 
          
93
 
<h2>Instance Variables </h2>
94
 
<ul>
95
 
</ul>
96
 
<h2>Methods </h2>
97
 
<ul>
98
 
<li ><a href ="NSObject.html#method-0">+alloc</a>
99
 
<li ><a href ="NSObject.html#method-1">+allocWithZone:</a>
100
 
<li ><a href ="NSObject.html#method-2">+cancelPreviousPerformRequestsWithTarget:selector:</a>
101
 
<li ><a href ="NSObject.html#method-3">+class</a>
102
 
<li ><a href ="NSObject.html#method-4">+conformsToProtocol:</a>
103
 
<li ><a href ="NSObject.html#method-5">+copyWithZone:</a>
104
 
<li ><a href ="NSObject.html#method-6">+description</a>
105
 
<li ><a href ="NSObject.html#method-7">+descriptionWithLocale:</a>
106
 
<li ><a href ="NSObject.html#method-8">+descriptionWithLocale:indent:</a>
107
 
<li ><a href ="NSObject.html#method-9">+descriptionWithLocale:indent:to:</a>
108
 
<li ><a href ="NSObject.html#method-10">+initialize</a>
109
 
<li ><a href ="NSObject.html#method-11">+instanceMethodForSelector:</a>
110
 
<li ><a href ="NSObject.html#method-12">+instanceMethodSignatureForSelector:</a>
111
 
<li ><a href ="NSObject.html#method-13">+instancesRespondToSelector:</a>
112
 
<li ><a href ="NSObject.html#method-14">+load</a>
113
 
<li ><a href ="NSObject.html#method-15">+mutableCopyWithZone:</a>
114
 
<li ><a href ="NSObject.html#method-16">+new</a>
115
 
<li ><a href ="NSObject.html#method-17">+poseAsClass:</a>
116
 
<li ><a href ="NSObject.html#method-18">+setVersion:</a>
117
 
<li ><a href ="NSObject.html#method-19">+superclass</a>
118
 
<li ><a href ="NSObject.html#method-20">+version</a>
119
 
<li ><a href ="NSObject.html#method-47">-_dealloc</a>
120
 
<li ><a href ="NSObject.html#method-21">-awakeAfterUsingCoder:</a>
121
 
<li ><a href ="NSObject.html#method-22">-classForArchiver</a>
122
 
<li ><a href ="NSObject.html#method-23">-classForCoder</a>
123
 
<li ><a href ="NSObject.html#method-24">-classForPortCoder</a>
124
 
<li ><a href ="NSObject.html#method-25">-connection:handleRequest:</a>
125
 
<li ><a href ="NSObject.html#method-26">-copy</a>
126
 
<li ><a href ="NSObject.html#method-27">-dealloc</a>
127
 
<li ><a href ="NSObject.html#method-45">-deallocNotificationsActive</a>
128
 
<li ><a href ="NSObject.html#method-28">-description</a>
129
 
<li ><a href ="NSObject.html#method-29">-descriptionWithLocale:</a>
130
 
<li ><a href ="NSObject.html#method-30">-descriptionWithLocale:indent:</a>
131
 
<li ><a href ="NSObject.html#method-31">-descriptionWithLocale:indent:to:</a>
132
 
<li ><a href ="NSObject.html#method-32">-doesNotRecognizeSelector:</a>
133
 
<li ><a href ="NSObject.html#method-33">-forwardInvocation:</a>
134
 
<li ><a href ="NSObject.html#method-34">-hash</a>
135
 
<li ><a href ="NSObject.html#method-35">-init</a>
136
 
<li ><a href ="NSObject.html#method-36">-isEqual:</a>
137
 
<li ><a href ="NSObject.html#method-37">-methodForSelector:</a>
138
 
<li ><a href ="NSObject.html#method-38">-methodSignatureForSelector:</a>
139
 
<li ><a href ="NSObject.html#method-39">-mutableCopy</a>
140
 
<li ><a href ="NSObject.html#method-40">-performSelector:withObject:</a>
141
 
<li ><a href ="NSObject.html#method-41">-performSelector:withObject:afterDelay:inModes:</a>
142
 
<li ><a href ="NSObject.html#method-42">-replacementObjectForArchiver:</a>
143
 
<li ><a href ="NSObject.html#method-43">-replacementObjectForCoder:</a>
144
 
<li ><a href ="NSObject.html#method-44">-replacementObjectForPortCoder:</a>
145
 
<li ><a href ="NSObject.html#method-46">-setDeallocNotificationsActive:</a>
146
 
</ul>
147
 
<hr><h2>Class Methods </h2>
148
 
<h3><a name ="method-0">alloc</a></h3>
149
 
+ (id) <b>alloc</b>;<br>
150
 
 
151
 
          Allocates a new instance of the receiver from the default
152
 
          zone, by invoking <code>allocWithZone:</code> with
153
 
          <code>NSDefaultMallocZone()</code> as the zone argument.
154
 
          Returns the created instance.
155
 
          
156
 
 <hr>
157
 
<h3><a name ="method-1">allocWithZone:</a></h3>
158
 
+ (id) <b>allocWithZone:</b> (NSZone*)zone;<br>
159
 
 
160
 
          This is the basic method to create a new instance.  It
161
 
          allocates a new instance of the receiver from the specified
162
 
          memory zone.  
163
 
          <p>
164
 
 
165
 
            Memory for an instance of the receiver is allocated; a
166
 
            pointer to this newly created instance is returned.  All
167
 
            instance variables are set to 0 except the
168
 
            <code>isa</code> pointer which is set to point to the
169
 
            object class.  No initialization of the instance is
170
 
            performed: it is your responsibility to initialize the
171
 
            instance by calling an appropriate <code>init</code>
172
 
            method.  If you are not using the garbage collector, it is
173
 
            also your responsibility to make sure the returned
174
 
            instance is destroyed when you finish using it, by calling
175
 
            the <code>release</code> method to destroy the instance
176
 
            directly, or by using <code>autorelease</code> and
177
 
            autorelease pools.
178
 
          </p>
179
 
 
180
 
          <p>
181
 
 
182
 
           You do not normally need to override this method in
183
 
           subclasses, unless you are implementing a class which for
184
 
           some reasons silently allocates instances of another class
185
 
           (this is typically needed to implement class clusters and
186
 
           similar design schemes).
187
 
          </p>
188
 
 
189
 
          <p>
190
 
 
191
 
            If you have turned on debugging of object allocation (by
192
 
            calling the <code>GSDebugAllocationActive</code>
193
 
            function), this method will also update the various
194
 
            debugging counts and monitors of allocated objects, which
195
 
            you can access using the <code>GSDebugAllocation...</code>
196
 
            functions.
197
 
          </p>
198
 
 
199
 
          
200
 
 <hr>
201
 
<h3><a name ="method-2">cancelPreviousPerformRequestsWithTarget:selector:</a></h3>
202
 
+ (void) <b>cancelPreviousPerformRequestsWithTarget:</b> (id)aTarget <b>selector:</b> (SEL)aSelector;<br>
203
 
 
204
 
          
205
 
 <hr>
206
 
<h3><a name ="method-3">class</a></h3>
207
 
+ (Class) <b>class</b>;<br>
208
 
 
209
 
          Returns the receiver.
210
 
          
211
 
 <hr>
212
 
<h3><a name ="method-4">conformsToProtocol:</a></h3>
213
 
+ (BOOL) <b>conformsToProtocol:</b> (Protocol*)aProtocol;<br>
214
 
 
215
 
          
216
 
 <hr>
217
 
<h3><a name ="method-5">copyWithZone:</a></h3>
218
 
+ (id) <b>copyWithZone:</b> (NSZone*)zone;<br>
219
 
 
220
 
          
221
 
 <hr>
222
 
<h3><a name ="method-6">description</a></h3>
223
 
+ (NSString*) <b>description</b>;<br>
224
 
 
225
 
            The <code>description</code> factory method describes the class
226
 
            of the receiver.  In the default GNUstep implementation, this
227
 
            simply returns the name of the class as an NSString object.
228
 
          
229
 
 <hr>
230
 
<h3><a name ="method-7">descriptionWithLocale:</a></h3>
231
 
+ (NSString*) <b>descriptionWithLocale:</b> (NSDictionary*)aLocale;<br>
232
 
Standards:  GNUstep<br>
233
 
 
234
 
            The default (NSOBject) implementation of this method simply calls
235
 
            the <code>description</code> method and discards the locale
236
 
            information.
237
 
          
238
 
 <hr>
239
 
<h3><a name ="method-8">descriptionWithLocale:indent:</a></h3>
240
 
+ (NSString*) <b>descriptionWithLocale:</b> (NSDictionary*)aLocale <b>indent:</b> (unsigned int)level;<br>
241
 
Standards:  GNUstep<br>
242
 
 
243
 
            The default (NSObject) implementation of this method simply calls
244
 
            the <code>descriptionWithLocale:</code> method and discards the
245
 
            level information.
246
 
          
247
 
 <hr>
248
 
<h3><a name ="method-9">descriptionWithLocale:indent:to:</a></h3>
249
 
+ (NSString*) <b>descriptionWithLocale:</b> (NSDictionary*)aLocale <b>indent:</b> (unsigned int)level <b>to:</b> (id&#60;GNUDescriptionDestination>)output;<br>
250
 
Standards:  GNUstep<br>
251
 
 
252
 
            The default (NSObject) implementation of this method simply calls
253
 
            the <code>descriptionWithLocale:indent:</code> method and appends
254
 
            the value returned by that method to the output object.
255
 
          
256
 
 <hr>
257
 
<h3><a name ="method-10">initialize</a></h3>
258
 
+ (void) <b>initialize</b>;<br>
259
 
 
260
 
          
261
 
 <hr>
262
 
<h3><a name ="method-11">instanceMethodForSelector:</a></h3>
263
 
+ (IMP) <b>instanceMethodForSelector:</b> (SEL)aSelector;<br>
264
 
 
265
 
          
266
 
 <hr>
267
 
<h3><a name ="method-12">instanceMethodSignatureForSelector:</a></h3>
268
 
+ (NSMethodSignature*) <b>instanceMethodSignatureForSelector:</b> (SEL)aSelector;<br>
269
 
 
270
 
            Returns a method signature object representing the
271
 
            method implemented for instsances of this class which
272
 
            corresponds to the supplied selector.
273
 
          
274
 
 <hr>
275
 
<h3><a name ="method-13">instancesRespondToSelector:</a></h3>
276
 
+ (BOOL) <b>instancesRespondToSelector:</b> (SEL)aSelector;<br>
277
 
 
278
 
          
279
 
 <hr>
280
 
<h3><a name ="method-14">load</a></h3>
281
 
+ (void) <b>load</b>;<br>
282
 
 
283
 
          
284
 
 <hr>
285
 
<h3><a name ="method-15">mutableCopyWithZone:</a></h3>
286
 
+ (id) <b>mutableCopyWithZone:</b> (NSZone*)zone;<br>
287
 
 
288
 
          
289
 
 <hr>
290
 
<h3><a name ="method-16">new</a></h3>
291
 
+ (id) <b>new</b>;<br>
292
 
 
293
 
          This method is a short-hand for alloc followed by init, that is,
294
 
           <p>
295
 
<code>
296
 
             NSObject *object = [NSObject new];
297
 
           </code></p>
298
 
 
299
 
          is exactly the same as 
300
 
           <p>
301
 
<code>
302
 
             NSObject *object = [[NSObject alloc] init];
303
 
           </code></p>
304
 
 
305
 
          <p>
306
 
 
307
 
            This is a general convention: all <code>new...</code>
308
 
            methods are supposed to return a newly allocated and
309
 
            initialized instance, as would be generated by an
310
 
            <code>alloc</code> method followed by a corresponding
311
 
            <code>init...</code> method.  Please note that if you are 
312
 
            not using a garbage collector, this means that instances 
313
 
            generated by the <code>new...</code> methods are not 
314
 
            autoreleased, that is, you are responsible for releasing 
315
 
            (autoreleasing) the instances yourself.  So when you use 
316
 
            <code>new</code> you typically do something like:
317
 
          </p>
318
 
 
319
 
          <p>
320
 
 
321
 
            <code>
322
 
               NSMutableArray *array = AUTORELEASE ([NSMutableArray new]);
323
 
            </code>
324
 
         </p>
325
 
 
326
 
          <p>
327
 
 
328
 
            You do no normally need to override <code>new</code> in
329
 
            subclasses, because if you override <code>init</code> (and
330
 
            optionally <code>allocWithZone:</code> if you really
331
 
            need), <code>new</code> will automatically use your
332
 
            subclass methods.
333
 
          </p>
334
 
 
335
 
          <p>
336
 
 
337
 
            You might need instead to define new <code>new...</code>
338
 
            methods specific to your subclass to match any
339
 
            <code>init...</code> specific to your subclass.  For
340
 
            example, if your subclass defines
341
 
          </p>
342
 
 
343
 
          <p>
344
 
 
345
 
            <code>-initWithName:</code>
346
 
          </p>
347
 
 
348
 
          <p>
349
 
 
350
 
            it might be handy for you to have a 
351
 
          </p>
352
 
 
353
 
          <p>
354
 
 
355
 
             <code>+newWithName:</code>
356
 
          </p>
357
 
 
358
 
          <p>
359
 
 
360
 
            which combines <code>alloc</code> and
361
 
            <code>initWithName:</code>.  You would implement it as follows:
362
 
          </p>
363
 
 
364
 
          <p>
365
 
 
366
 
            <code> 
367
 
              + (id) newWithName: (NSString *)aName 
368
 
                { 
369
 
                   return [[self alloc] initWithName: aName]; 
370
 
                } 
371
 
            </code>
372
 
          </p>
373
 
 
374
 
          
375
 
 <hr>
376
 
<h3><a name ="method-17">poseAsClass:</a></h3>
377
 
+ (void) <b>poseAsClass:</b> (Class)aClass;<br>
378
 
 
379
 
          
380
 
 <hr>
381
 
<h3><a name ="method-18">setVersion:</a></h3>
382
 
+ (void) <b>setVersion:</b> (int)aVersion;<br>
383
 
 
384
 
          
385
 
 <hr>
386
 
<h3><a name ="method-19">superclass</a></h3>
387
 
+ (Class) <b>superclass</b>;<br>
388
 
 
389
 
          
390
 
 <hr>
391
 
<h3><a name ="method-20">version</a></h3>
392
 
+ (int) <b>version</b>;<br>
393
 
 
394
 
          
395
 
 <hr>
396
 
<hr><h2>Instances Methods </h2>
397
 
<h3><a name ="method-21">awakeAfterUsingCoder:</a></h3>
398
 
- (id) <b>awakeAfterUsingCoder:</b> (NSCoder*)aDecoder;<br>
399
 
 
400
 
          
401
 
 <hr>
402
 
<h3><a name ="method-22">classForArchiver</a></h3>
403
 
- (Class) <b>classForArchiver</b>;<br>
404
 
 
405
 
          
406
 
 <hr>
407
 
<h3><a name ="method-23">classForCoder</a></h3>
408
 
- (Class) <b>classForCoder</b>;<br>
409
 
 
410
 
          
411
 
 <hr>
412
 
<h3><a name ="method-24">classForPortCoder</a></h3>
413
 
- (Class) <b>classForPortCoder</b>;<br>
414
 
 
415
 
          
416
 
 <hr>
417
 
<h3><a name ="method-25">connection:handleRequest:</a></h3>
418
 
- (BOOL) <b>connection:</b> (NSConnection*)connection <b>handleRequest:</b> (NSDistantObjectRequest*)doreq;<br>
419
 
 
420
 
          
421
 
 <hr>
422
 
<h3><a name ="method-26">copy</a></h3>
423
 
- (id) <b>copy</b>;<br>
424
 
 
425
 
          
426
 
 <hr>
427
 
<h3><a name ="method-27">dealloc</a></h3>
428
 
- (void) <b>dealloc</b>;<br>
429
 
 
430
 
          <p>
431
 
 
432
 
            <code>NSObject</code>'s implementation of this method
433
 
            destroys the receiver, by returning the memory allocated
434
 
            to the receiver to the system.  After this method has been
435
 
            called on an instance, you must not refer the instance in
436
 
            any way, because it does not exist any longer.  If you do,
437
 
            it is a bug and your program might even crash with a
438
 
            segmentation fault.
439
 
          </p>
440
 
 
441
 
          <p>
442
 
 
443
 
            If you have turned on the debugging facilities for
444
 
            instance allocation, <code>NSObject</code>'s
445
 
            implementation of this method will also update the various
446
 
            counts and monitors of allocated instances (see the
447
 
            <code>GSDebugAllocation...</code> functions for more
448
 
            info).
449
 
          </p>
450
 
 
451
 
          <p>
452
 
 
453
 
            Normally you are supposed to manage the memory taken by
454
 
            objects by using the high level interface provided by the
455
 
            <code>retain</code>, <code>release</code> and
456
 
            <code>autorelease</code> methods (or better by the
457
 
            corresponding macros <code>RETAIN</code>,
458
 
            <code>RELEASE</code> and <code>AUTORELEASE</code>), and by
459
 
            autorelease pools and such; whenever the
460
 
            release/autorelease mechanism determines that an object is
461
 
            no longer needed (which happens when its retain count
462
 
            reaches 0), it will call the <code>dealloc</code> method
463
 
            to actually deallocate the object.  This means that normally, 
464
 
            you should not need to call <code>dealloc</code> directly as 
465
 
            the gnustep base library automatically calls it for you when 
466
 
            the retain count of an object reaches 0.
467
 
          </p>
468
 
 
469
 
          <p>
470
 
 
471
 
            Because the <code>dealloc</code> method will be called
472
 
            when an instance is being destroyed, if instances of your
473
 
            subclass use objects or resources (as it happens for most
474
 
            useful classes), you must override <code>dealloc</code> in
475
 
            subclasses to release all objects and resources which are
476
 
            used by the instance, otherwise these objects and
477
 
            resources would be leaked.  In the subclass
478
 
            implementation, you should first release all your subclass
479
 
            specific objects and resources, and then invoke super's
480
 
            implementation (which will do the same, and so on up in
481
 
            the class hierarchy to <code>NSObject</code>'s
482
 
            implementation, which finally destroys the object).  Here
483
 
            is an example of the implementation of
484
 
            <code>dealloc</code> for a subclass whose instances have a
485
 
            single instance variable <code>name</code> which needs to
486
 
            be released when an instance is deallocated:
487
 
          </p>
488
 
 
489
 
          <p>
490
 
 
491
 
            <code>
492
 
            - (void) dealloc
493
 
              {
494
 
                RELEASE (name);
495
 
                [super dealloc];
496
 
              }
497
 
            </code>
498
 
           </p>
499
 
 
500
 
           <p>
501
 
 
502
 
             <code>dealloc</code> might contain code to release not
503
 
             only objects, but also other resources, such as open
504
 
             files, network connections, raw memory allocated in other
505
 
             ways, etc.
506
 
           </p>
507
 
 
508
 
          
509
 
 <hr>
510
 
<h3><a name ="method-28">description</a></h3>
511
 
- (NSString*) <b>description</b>;<br>
512
 
 
513
 
            <p>
514
 
 
515
 
              The <code>description</code> method describes the reciever.
516
 
              In the default GNUstep implementation, this returns an NSString
517
 
              object giving the name of the class of the receiver and the
518
 
              hexadecimal representation of the recievers address enclosed
519
 
              in angle brackets.
520
 
            </p>
521
 
 
522
 
            <p>
523
 
 
524
 
              Generally, classes other than NSObject will override this method
525
 
              to provide a more informative description of their instances.
526
 
            </p>
527
 
 
528
 
          
529
 
 <hr>
530
 
<h3><a name ="method-29">descriptionWithLocale:</a></h3>
531
 
- (NSString*) <b>descriptionWithLocale:</b> (NSDictionary*)aLocale;<br>
532
 
Standards:  GNUstep<br>
533
 
 
534
 
            The default (NSOBject) implementation of this method simply calls
535
 
            the <code>description</code> method and discards the locale
536
 
            information.
537
 
          
538
 
 <hr>
539
 
<h3><a name ="method-30">descriptionWithLocale:indent:</a></h3>
540
 
- (NSString*) <b>descriptionWithLocale:</b> (NSDictionary*)aLocale <b>indent:</b> (unsigned int)level;<br>
541
 
Standards:  GNUstep<br>
542
 
 
543
 
            The default (NSObject) implementation of this method simply calls
544
 
            the <code>descriptionWithLocale:</code> method and discards the
545
 
            level information.
546
 
          
547
 
 <hr>
548
 
<h3><a name ="method-31">descriptionWithLocale:indent:to:</a></h3>
549
 
- (NSString*) <b>descriptionWithLocale:</b> (NSDictionary*)aLocale <b>indent:</b> (unsigned int)level <b>to:</b> (id&#60;GNUDescriptionDestination>)output;<br>
550
 
Standards:  GNUstep<br>
551
 
 
552
 
            The default (NSObject) implementation of this method simply calls
553
 
            the <code>descriptionWithLocale:indent:</code> method and appends
554
 
            the value returned by that method to the output object.
555
 
            <p>
556
 
 
557
 
              Property-list classes (NSString, NSArray, NSDictionary and
558
 
              NSData) will override this method in order to efficiently
559
 
              write descriptions of themselves into property lists.
560
 
            </p>
561
 
 
562
 
          
563
 
 <hr>
564
 
<h3><a name ="method-32">doesNotRecognizeSelector:</a></h3>
565
 
- (void) <b>doesNotRecognizeSelector:</b> (SEL)aSelector;<br>
566
 
 
567
 
          
568
 
 <hr>
569
 
<h3><a name ="method-33">forwardInvocation:</a></h3>
570
 
- (void) <b>forwardInvocation:</b> (NSInvocation*)anInvocation;<br>
571
 
 
572
 
          
573
 
 <hr>
574
 
<h3><a name ="method-34">hash</a></h3>
575
 
- (unsigned int) <b>hash</b>;<br>
576
 
 
577
 
          
578
 
 <hr>
579
 
<h3><a name ="method-35">init</a></h3>
580
 
- (id) <b>init</b>;<br>
581
 
 
582
 
          
583
 
 <hr>
584
 
<h3><a name ="method-36">isEqual:</a></h3>
585
 
- (BOOL) <b>isEqual:</b> (id)anObject;<br>
586
 
 
587
 
          
588
 
 <hr>
589
 
<h3><a name ="method-37">methodForSelector:</a></h3>
590
 
- (IMP) <b>methodForSelector:</b> (SEL)aSelector;<br>
591
 
 
592
 
          
593
 
 <hr>
594
 
<h3><a name ="method-38">methodSignatureForSelector:</a></h3>
595
 
- (NSMethodSignature*) <b>methodSignatureForSelector:</b> (SEL)aSelector;<br>
596
 
 
597
 
            Returns a method signature object representing the
598
 
            method implemented in this object which corresponds to
599
 
            the supplied selector.
600
 
          
601
 
 <hr>
602
 
<h3><a name ="method-39">mutableCopy</a></h3>
603
 
- (id) <b>mutableCopy</b>;<br>
604
 
 
605
 
          
606
 
 <hr>
607
 
<h3><a name ="method-40">performSelector:withObject:</a></h3>
608
 
- (void) <b>performSelector:</b> (SEL)aSelector <b>withObject:</b> (id)anArgument;<br>
609
 
 
610
 
          
611
 
 <hr>
612
 
<h3><a name ="method-41">performSelector:withObject:afterDelay:inModes:</a></h3>
613
 
- (void) <b>performSelector:</b> (SEL)aSelector <b>withObject:</b> (id)anArgument <b>afterDelay:</b> (NSTimeInterval)delay <b>inModes:</b> (NSArray*)modes;<br>
614
 
 
615
 
          
616
 
 <hr>
617
 
<h3><a name ="method-42">replacementObjectForArchiver:</a></h3>
618
 
- (id) <b>replacementObjectForArchiver:</b> (NSArchiver*)anArchiver;<br>
619
 
 
620
 
          
621
 
 <hr>
622
 
<h3><a name ="method-43">replacementObjectForCoder:</a></h3>
623
 
- (id) <b>replacementObjectForCoder:</b> (NSCoder*)aCoder;<br>
624
 
 
625
 
          
626
 
 <hr>
627
 
<h3><a name ="method-44">replacementObjectForPortCoder:</a></h3>
628
 
- (id) <b>replacementObjectForPortCoder:</b> (NSPortCoder*)aCoder;<br>
629
 
 
630
 
          
631
 
 <hr>
632
 
<h3><a name ="method-45">deallocNotificationsActive</a></h3>
633
 
- (BOOL) <b>deallocNotificationsActive</b>;<br>
634
 
 
635
 
            <p>
636
 
 
637
 
              Returns a boolean indicating whether deallocation notification
638
 
              has been turned on.
639
 
            </p>
640
 
 
641
 
            <p>
642
 
 
643
 
              If deallocation notification is turned on, whenever an objects
644
 
              retain count reaches zero (and it would normally be deallocated)
645
 
              the <em>_dealloc</em> methiod is called and the object is only
646
 
              deallocated if that method returns YES.
647
 
            </p>
648
 
 
649
 
          
650
 
 <hr>
651
 
<h3><a name ="method-46">setDeallocNotificationsActive:</a></h3>
652
 
- (void) <b>setDeallocNotificationsActive:</b> (BOOL)flag;<br>
653
 
 
654
 
            <p>
655
 
 
656
 
              Turns on (or off) deallocation notification.
657
 
            </p>
658
 
 
659
 
            <p>
660
 
 
661
 
              If deallocation notification is turned on, whenever an objects
662
 
              retain count reaches zero (and it would normally be deallocated)
663
 
              the <em>_dealloc</em> methiod is called and the object is only
664
 
              deallocated if that method returns YES.
665
 
            </p>
666
 
 
667
 
          
668
 
 <hr>
669
 
<h3><a name ="method-47">_dealloc</a></h3>
670
 
- (BOOL) <b>_dealloc</b>;<br>
671
 
 
672
 
            <p>
673
 
 
674
 
              Returns a boolean indicating whether the receiver should be
675
 
              deallocated or not.  The default implementation returns YES.
676
 
            </p>
677
 
 
678
 
            <p>
679
 
 
680
 
              This method is called when an objects retain count reaches
681
 
              zero (if deallocation notifications are active).
682
 
            </p>
683
 
 
684
 
            <p>
685
 
 
686
 
              This method is provided so that you can take some sort of
687
 
              action when objects are deallocated ... normally you would
688
 
              override this method in your classes, but you could also
689
 
              override it in a category of NSObject - and perform some
690
 
              action whenever <em>any</em> object is deallocated.
691
 
            </p>
692
 
 
693
 
          
694
 
 <hr>
695
 
</body>
696
 
 
697
 
 </html>