This file is indexed.

/usr/share/GNUstep/Documentation/Developer/Base/Reference/NSUserDefaults.html is in gnustep-base-doc 1.24.7-1build2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    <head>
    <title>NSUserDefaults class reference</title>
  </head>
  <body>
    <font face="serif">
    <a href="Base.html">Up</a>
    <br />
    <h1><a name="title$NSUserDefaults">NSUserDefaults class reference</a></h1>
    <h3>Authors</h3>
    <dl>
      <dt>Georg Tuparev (<a href="mailto:Tuparev@EMBL-Heidelberg.de"><code>Tuparev@EMBL-Heidelberg.de</code></a>)</dt>
      <dd>
      </dd>
      <dt>Richard Frith-Macdonald (<a href="mailto:rfm@gnu.org"><code>rfm@gnu.org</code></a>)</dt>
      <dd>
      </dd>
    </dl>
    <p><b>Version:</b> 38018</p>
    <p><b>Date:</b> 2014-07-28 15:40:29 +0100 (Mon, 28 Jul 2014)</p>
    <p><b>Copyright:</b> (C) 1995-2001 Free Software Foundation, Inc.</p>

        <div>
    </div>

          <h1><a name="001000000000">
        Software documentation for the NSUserDefaults class
      </a></h1>
    <h2><a name="class$NSUserDefaults">NSUserDefaults</a> : <a rel="gsdoc" href="NSObject.html#class$NSObject">NSObject</a></h2>
    <blockquote class="declared">
      <dl>
        <dt><b>Declared in:</b></dt>
        <dd>Foundation/NSUserDefaults.h</dd>
      </dl>
    </blockquote>
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
          
    </p>
    <p>

            NSUserDefaults provides an interface to the
            defaults system, which allows an application
            access to global and/or application specific
            defaults set by the user. A particular instance of
            NSUserDefaults, standardUserDefaults, is
            provided as a convenience. Most of the information
            described below pertains to the
            standardUserDefaults. It is unlikely
            that you would want to instantiate your own
            userDefaults object, since it would not be set
            up in the same way as the standardUserDefaults.
              </p>
    <p>
      
          
    </p>
    <p>

            Defaults are managed based on <em>domains</em>.
            Certain domains, such as
            <code>NSGlobalDomain</code>, are persistent. These
            domains have defaults that are stored externally.
            Other domains are volatile. The defaults in these
            domains remain in effect only during the existence
            of the application and may in fact be different for
            applications running at the same time. When
            asking for a default value from
            standardUserDefaults, NSUserDefaults
            looks through the various domains in a particular
            order.
              </p>
    <p>
      
          
      <dl>
        <dt>
              <code>GSPrimaryDomain</code>... volatile
            </dt>
        <dd>
          
              Contains values set at runtime and intended to
              supercede any values set in other domains. This
              should be used with great care since it overrides
              values which may have been set explicitly by the
              user.
            
        </dd>
        <dt>
              <code>NSArgumentDomain</code>... volatile
            </dt>
        <dd>
          
              Contains defaults read from the arguments
              provided to the application at startup. <br />
              Pairs of arguments are used for this, with the
              first argument in each pair being the name of a
              default (with a hyphen prepended) and the second
              argument of the pair being the value of the
              default. <br /> NB. In GNUstep special arguments
              of the form <code>--GNU-Debug=...</code> are used to
              enable debugging. Despite beginning with a hyphen,
              these are not treated as default keys.
            
        </dd>
        <dt>
              Application (name of the current process)...
              persistent
            </dt>
        <dd>
          
              Contains application specific defaults, such as
              window positions. This is the domain used by the
              <a rel="gsdoc" href="#method$NSUserDefaults-setObject$forKey$">
                -setObject:forKey:
              </a>

              method and is the domain normally used when
              setting preferences for an application.
            
        </dd>
        <dt>
              <code>NSGlobalDomain</code>... persistent
            </dt>
        <dd>
          
              Global defaults applicable to all applications.
            
        </dd>
        <dt>
              Language (name based on users&apos;s language)...
              volatile
            </dt>
        <dd>
          
              Constants that help with localization to the
              users&apos;s language.
            
        </dd>
        <dt><code>GSConfigDomain</code>... volatile</dt>
        <dd>
          
              Information retrieved from the GNUstep
              configuration system. Usually the system
              wide and user specific GNUstep.conf files, or from
              information compiled in when the base library
              was built. <br /> In addition to this standard
              configuration information, this domain
              contains all values from property lists store in
              the GlobalDefaults subdirectory or from the
              GlobalDefaults.plist file stored in
              the same directory as the system wide GNUstep.conf
              file.
            
        </dd>
        <dt>
              <code>NSRegistrationDomain</code>... volatile
            </dt>
        <dd>
          
              Temporary defaults set up by the application.
            
        </dd>
      </dl>
      
          
    </p>
    <p>

            The <em>NSLanguages</em> default value is used to set
            up the constants for localization. GNUstep will also
            look for the <code>LANGUAGES</code> environment
            variable if it is not set in the defaults system.
            If it exists, it consists of an array of languages that
            the user prefers. At least one of the languages should
            have a corresponding localization file (typically
            located in the <code>Languages</code> directory of
            the GNUstep resources).
              </p>
    <p>
      
          
    </p>
    <p>

            As a special extension, on systems that support locales
            (e.g. GNU/Linux and Solaris), GNUstep will use
            information from the user specified locale, if
            the <em>NSLanguages</em> default value is not found.
            Typically the locale is specified in the
            environment with the <code>LANG</code>
            environment variable.
              </p>
    <p>
      
          
    </p>
    <p>

            The first change to a persistent domain after a
            <a rel="gsdoc" href="#method$NSUserDefaults-synchronize">
              -synchronize
            </a>

            will cause an NSUserDefaultsDidChangeNotification to
            be posted (as will any change caused by reading new
            values from disk), so your application can keep
            track of changes made to the defaults by other
            software.
              </p>
    <p>
      
          
    </p>
    <p>

            NB. The GNUstep implementation differs from the Apple
            one in that it is thread-safe while Apple&apos;s (as of
            MacOS-X 10.1) is not.
              </p>
    <p>
      
        
    </div>
    <b>Method summary</b>
    <ul>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults+resetStandardUserDefaults">+resetStandardUserDefaults</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults+setUserLanguages$">+setUserLanguages:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults+standardUserDefaults">+standardUserDefaults</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults+userLanguages">+userLanguages</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-addSuiteNamed$">-addSuiteNamed:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-arrayForKey$">-arrayForKey:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-boolForKey$">-boolForKey:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-dataForKey$">-dataForKey:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-dictionaryForKey$">-dictionaryForKey:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-dictionaryRepresentation">-dictionaryRepresentation</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-doubleForKey$">-doubleForKey:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-floatForKey$">-floatForKey:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-init">-init</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-initWithUser$">-initWithUser:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-integerForKey$">-integerForKey:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-objectForKey$">-objectForKey:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-persistentDomainForName$">-persistentDomainForName:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-persistentDomainNames">-persistentDomainNames</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-registerDefaults$">-registerDefaults:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-removeObjectForKey$">-removeObjectForKey:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-removePersistentDomainForName$">-removePersistentDomainForName:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-removeSuiteNamed$">-removeSuiteNamed:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-removeVolatileDomainForName$">-removeVolatileDomainForName:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-searchList">-searchList</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-setBool$forKey$">-setBool:forKey:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-setDouble$forKey$">-setDouble:forKey:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-setFloat$forKey$">-setFloat:forKey:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-setInteger$forKey$">-setInteger:forKey:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-setObject$forKey$">-setObject:forKey:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-setPersistentDomain$forName$">-setPersistentDomain:forName:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-setSearchList$">-setSearchList:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-setVolatileDomain$forName$">-setVolatileDomain:forName:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-stringArrayForKey$">-stringArrayForKey:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-stringForKey$">-stringForKey:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-synchronize">-synchronize</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-volatileDomainForName$">-volatileDomainForName:</a></li>
      <li><a rel="gsdoc" href="NSUserDefaults.html#method$NSUserDefaults-volatileDomainNames">-volatileDomainNames</a></li>
    </ul>
    <hr width="50%" align="left" />
<div class="method">
    <h3><a name="method$NSUserDefaults+resetStandardUserDefaults">resetStandardUserDefaults&nbsp;</a></h3>
    + (void) <b>resetStandardUserDefaults</b>;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            Resets the shared user defaults object to reflect
            the current user ID. Needed by setuid processes which
            change the user they are running as. <br /> In
            GNUstep you should call
            <a rel="gsdoc" href="Functions.html#function$GSSetUserName">
              GSSetUserName()
            </a>

            when changing your effective user ID, and that
            function will call this function for you.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults+setUserLanguages$">setUserLanguages:&nbsp;</a></h3>
    + (void) <b>setUserLanguages:</b> (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*)languages;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            Sets the array of user <var>languages</var>
            preferences. Places the specified array in the
            <em>NSLanguages</em> user default.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults+standardUserDefaults">standardUserDefaults&nbsp;</a></h3>
    + (<a rel="gsdoc" href="#class$NSUserDefaults">NSUserDefaults</a>*) <b>standardUserDefaults</b>;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Returns the shared defaults object. If it doesn&apos;t
            exist yet, it&apos;s created. The defaults are initialized
            for the current user. The search list is guaranteed to
            be standard only the first time this method is invoked.
            The shared instance is provided as a convenience; other
            instances may also be created.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults+userLanguages">userLanguages&nbsp;</a></h3>
    + (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*) <b>userLanguages</b>;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            Returns the array of user languages preferences.
            Uses the <em>NSLanguages</em> user default if
            available, otherwise tries to infer setup from
            operating system information etc (in particular,
            uses the <em>LANGUAGES</em> environment variable).
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-addSuiteNamed$">addSuiteNamed:&nbsp;</a></h3>
    - (void) <b>addSuiteNamed:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)aName;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            Adds the domain names <var>aName</var> to the search
            list of the receiver. <br /> The domain is added after
            the application domain. <br /> Suites may be removed
            using the
            <a rel="gsdoc" href="#method$NSUserDefaults-removeSuiteNamed$">
              -removeSuiteNamed:
            </a>

            method.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-arrayForKey$">arrayForKey:&nbsp;</a></h3>
    - (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*) <b>arrayForKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)defaultName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Looks up a value for a specified default using
            <a rel="gsdoc" href="#method$NSUserDefaults-objectForKey$">
              -objectForKey:
            </a>

            and checks that it is an NSArray object. Returns
            <code>nil</code> if it is not.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-boolForKey$">boolForKey:&nbsp;</a></h3>
    - (BOOL) <b>boolForKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)defaultName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Looks up a value for a specified default using
            <a rel="gsdoc" href="#method$NSUserDefaults-objectForKey$">
              -objectForKey:
            </a>

            and returns its boolean representation. <br /> Returns
            <code>NO</code> if it is not a boolean. <br /> The
            text &apos;yes&apos; or &apos;true&apos; or any non zero numeric value is
            considered to be a boolean <code>YES</code>.
            Other string values are <code>NO</code>. <br /> NB.
            This differs slightly from the documented behavior for
            MacOS-X (August 2002) in that the GNUstep version
            accepts the string &apos;TRUE&apos; as equivalent to &apos;YES&apos;.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-dataForKey$">dataForKey:&nbsp;</a></h3>
    - (<a rel="gsdoc" href="NSData.html#class$NSData">NSData</a>*) <b>dataForKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)defaultName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Looks up a value for a specified default using
            <a rel="gsdoc" href="#method$NSUserDefaults-objectForKey$">
              -objectForKey:
            </a>

            and checks that it is an NSData object. Returns
            <code>nil</code> if it is not.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-dictionaryForKey$">dictionaryForKey:&nbsp;</a></h3>
    - (<a rel="gsdoc" href="NSDictionary.html#class$NSDictionary">NSDictionary</a>*) <b>dictionaryForKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)defaultName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Looks up a value for a specified default using
            <a rel="gsdoc" href="#method$NSUserDefaults-objectForKey$">
              -objectForKey:
            </a>

            and checks that it is an NSDictionary object. Returns
            <code>nil</code> if it is not.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-dictionaryRepresentation">dictionaryRepresentation&nbsp;</a></h3>
    - (<a rel="gsdoc" href="NSDictionary.html#class$NSDictionary">NSDictionary</a>*) <b>dictionaryRepresentation</b>;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Returns a dictionary representing the current state
            of the defaults system... this is a merged version of
            all the domains in the search list.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-doubleForKey$">doubleForKey:&nbsp;</a></h3>
    - (double) <b>doubleForKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)defaultName;<br />
    <div class="availability">
<b>Availability:</b> MacOS-X 10.5.0</div>
<br />
    <div class="desc">
      
            Looks up a value for a specified default using
            <a rel="gsdoc" href="#method$NSUserDefaults-objectForKey$">
              -objectForKey:
            </a>

            and checks that it is a <strong>double</strong>.
            Returns 0.0 if it is not.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-floatForKey$">floatForKey:&nbsp;</a></h3>
    - (float) <b>floatForKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)defaultName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Looks up a value for a specified default using
            <a rel="gsdoc" href="#method$NSUserDefaults-objectForKey$">
              -objectForKey:
            </a>

            and checks that it is a <strong>float</strong>. Returns
            0.0 if it is not.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-init">init&nbsp;</a></h3>
    - (id) <b>init</b>;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Initializes defaults for current user calling
            initWithUser:
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-initWithUser$">initWithUser:&nbsp;</a></h3>
    - (id) <b>initWithUser:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)userName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
This is a designated initialiser for the class.<br />
    <div class="desc">
      
            Initializes defaults for the specified user.
            <br /> Returns an object with an empty search list.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-integerForKey$">integerForKey:&nbsp;</a></h3>
    - (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>) <b>integerForKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)defaultName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Looks up a value for a specified default using
            <a rel="gsdoc" href="#method$NSUserDefaults-objectForKey$">
              -objectForKey:
            </a>

            and returns its integer value or 0 if it is not
            representable as an integer.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-objectForKey$">objectForKey:&nbsp;</a></h3>
    - (id) <b>objectForKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)defaultName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Looks up a value for a specified default using. The
            lookup is performed by accessing the domains in the
            order given in the search list. <br /> Returns
            <code>nil</code> if <var>defaultName</var> cannot be
            found.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-persistentDomainForName$">persistentDomainForName:&nbsp;</a></h3>
    - (<a rel="gsdoc" href="NSDictionary.html#class$NSDictionary">NSDictionary</a>*) <b>persistentDomainForName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)domainName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Returns the persistent domain specified by
            <var>domainName</var>.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-persistentDomainNames">persistentDomainNames&nbsp;</a></h3>
    - (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*) <b>persistentDomainNames</b>;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Returns an array listing the name of all the
            persistent domains.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-registerDefaults$">registerDefaults:&nbsp;</a></h3>
    - (void) <b>registerDefaults:</b> (<a rel="gsdoc" href="NSDictionary.html#class$NSDictionary">NSDictionary</a>*)newVals;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Merges the contents of the dictionary
            <var>newVals</var> into the registration domain.
            Registration defaults may be added to or
            replaced using this method, but may never be
            removed. Thus, setting registration defaults at
            any point in your program guarantees that the defaults
            will be available thereafter.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-removeObjectForKey$">removeObjectForKey:&nbsp;</a></h3>
    - (void) <b>removeObjectForKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)defaultName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Removes the default with the specified name from
            the application domain.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-removePersistentDomainForName$">removePersistentDomainForName:&nbsp;</a></h3>
    - (void) <b>removePersistentDomainForName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)domainName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Removes the persistent domain specified by
            <var>domainName</var> from the user defaults. <br />
            Causes a NSUserDefaultsDidChangeNotification to be
            posted if this is the first change to a
            persistent-domain since the last
            <a rel="gsdoc" href="#method$NSUserDefaults-synchronize">
              -synchronize
            </a>

            .
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-removeSuiteNamed$">removeSuiteNamed:&nbsp;</a></h3>
    - (void) <b>removeSuiteNamed:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)aName;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            Removes the named domain from the search list of
            the receiver. <br /> Suites may be added using the
            <a rel="gsdoc" href="#method$NSUserDefaults-addSuiteNamed$">
              -addSuiteNamed:
            </a>

            method.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-removeVolatileDomainForName$">removeVolatileDomainForName:&nbsp;</a></h3>
    - (void) <b>removeVolatileDomainForName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)domainName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Removes the volatile domain specified by
            <var>domainName</var> from the user defaults.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-searchList">searchList&nbsp;</a></h3>
    - (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*) <b>searchList</b>;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Returns an array listing the domains searched in
            order to look up a value in the defaults system. The
            order of the names in the array is the order in which
            the domains are searched.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-setBool$forKey$">setBool:&nbsp;forKey:&nbsp;</a></h3>
    - (void) <b>setBool:</b> (BOOL)value<b> forKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)defaultName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Sets a boolean <var>value</var> for
            <var>defaultName</var> in the application domain.
            <br /> Calls
            <a rel="gsdoc" href="#method$NSUserDefaults-setObject$forKey$">
              -setObject:forKey:
            </a>

            to make the change by storing a string containing either
            the word <code>YES</code> or <code>NO</code>.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-setDouble$forKey$">setDouble:&nbsp;forKey:&nbsp;</a></h3>
    - (void) <b>setDouble:</b> (double)value<b> forKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)defaultName;<br />
    <div class="availability">
<b>Availability:</b> MacOS-X 10.5.0</div>
<br />
    <div class="desc">
      
            Sets a <strong>double</strong> <var>value</var> for
            <var>defaultName</var> in the application domain.
            <br /> Calls
            <a rel="gsdoc" href="#method$NSUserDefaults-setObject$forKey$">
              -setObject:forKey:
            </a>

            to make the change by storing a <strong>double</strong>
            <a rel="gsdoc" href="NSValue.html#class$NSNumber">NSNumber</a>

              instance.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-setFloat$forKey$">setFloat:&nbsp;forKey:&nbsp;</a></h3>
    - (void) <b>setFloat:</b> (float)value<b> forKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)defaultName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Sets a <strong>float</strong> <var>value</var> for
            <var>defaultName</var> in the application domain.
            <br /> Calls
            <a rel="gsdoc" href="#method$NSUserDefaults-setObject$forKey$">
              -setObject:forKey:
            </a>

            to make the change by storing a <strong>float</strong>
            <a rel="gsdoc" href="NSValue.html#class$NSNumber">NSNumber</a>

              instance.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-setInteger$forKey$">setInteger:&nbsp;forKey:&nbsp;</a></h3>
    - (void) <b>setInteger:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)value<b> forKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)defaultName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Sets an integer <var>value</var> for
            <var>defaultName</var> in the application domain.
            <br /> Calls
            <a rel="gsdoc" href="#method$NSUserDefaults-setObject$forKey$">
              -setObject:forKey:
            </a>

            to make the change by storing an intege
            <a rel="gsdoc" href="NSValue.html#class$NSNumber">NSNumber</a>

              instance.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-setObject$forKey$">setObject:&nbsp;forKey:&nbsp;</a></h3>
    - (void) <b>setObject:</b> (id)value<b> forKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)defaultName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Sets a copy of an object <var>value</var> for
            <var>defaultName</var> in the application domain.
            <br /> The <var>defaultName</var> must be a
            non-empty string. <br /> The <var>value</var> to
            be copied into the domain must be an instance of one of
            the
            <a rel="gsdoc" href="NSString.html#method$NSString-propertyList">
              [NSString -propertyList]
            </a>

            classes. <br />
            
    </p>
    <p>

              Causes a NSUserDefaultsDidChangeNotification to be
              posted if this is the first change to a
              persistent-domain since the last
              <a rel="gsdoc" href="#method$NSUserDefaults-synchronize">
                -synchronize
              </a>

              .
                </p>
    <p>
      
            If <var>value</var> is <code>nil</code>, this is
            equivalent to the
            <a rel="gsdoc" href="#method$NSUserDefaults-removeObjectForKey$">
              -removeObjectForKey:
            </a>

            method.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-setPersistentDomain$forName$">setPersistentDomain:&nbsp;forName:&nbsp;</a></h3>
    - (void) <b>setPersistentDomain:</b> (<a rel="gsdoc" href="NSDictionary.html#class$NSDictionary">NSDictionary</a>*)domain<b> forName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)domainName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Replaces the persistent-domain specified by
            <var>domainName</var> with <var>domain</var>... a
            dictionary containing keys and defaults values.
            <br /> Raises an NSInvalidArgumentException if
            <var>domainName</var> already exists as a
            volatile-domain. <br /> Causes a
            NSUserDefaultsDidChangeNotification
            to be posted if this is the first change to a
            persistent-domain since the last
            <a rel="gsdoc" href="#method$NSUserDefaults-synchronize">
              -synchronize
            </a>

            .
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-setSearchList$">setSearchList:&nbsp;</a></h3>
    - (void) <b>setSearchList:</b> (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*)newList;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Sets the list of the domains searched in order to look
            up a value in the defaults system. The order of the
            names in the array is the order in which the domains
            are searched. <br /> On lookup, the first match is
            used.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-setVolatileDomain$forName$">setVolatileDomain:&nbsp;forName:&nbsp;</a></h3>
    - (void) <b>setVolatileDomain:</b> (<a rel="gsdoc" href="NSDictionary.html#class$NSDictionary">NSDictionary</a>*)domain<b> forName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)domainName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Sets the volatile-domain specified by
            <var>domainName</var> to <var>domain</var>... a
            dictionary containing keys and defaults values.
            <br /> Raises an NSInvalidArgumentException if
            <var>domainName</var> already exists as either a
            volatile-domain or a persistent-domain.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-stringArrayForKey$">stringArrayForKey:&nbsp;</a></h3>
    - (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*) <b>stringArrayForKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)defaultName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Calls
            <a rel="gsdoc" href="#method$NSUserDefaults-arrayForKey$">
              -arrayForKey:
            </a>

            to get an array value for <var>defaultName</var> and
            checks that the array contents are string objects...
            if not, returns <code>nil</code>.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-stringForKey$">stringForKey:&nbsp;</a></h3>
    - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>stringForKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)defaultName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Looks up a value for a specified default using
            <a rel="gsdoc" href="#method$NSUserDefaults-objectForKey$">
              -objectForKey:
            </a>

            and checks that it is an NSString. Returns
            <code>nil</code> if it is not.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-synchronize">synchronize&nbsp;</a></h3>
    - (BOOL) <b>synchronize</b>;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Ensures that the in-memory and on-disk
            representations of the defaults are in
            sync. You may call this yourself, but probably don&apos;t
            need to since it is invoked at intervals whenever a
            runloop is running. <br /> If any persistent domain
            is changed by reading new values from disk, an
            NSUserDefaultsDidChangeNotification
            is posted.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-volatileDomainForName$">volatileDomainForName:&nbsp;</a></h3>
    - (<a rel="gsdoc" href="NSDictionary.html#class$NSDictionary">NSDictionary</a>*) <b>volatileDomainForName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)domainName;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Returns the volatile domain specified by
            <var>domainName</var>.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSUserDefaults-volatileDomainNames">volatileDomainNames&nbsp;</a></h3>
    - (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*) <b>volatileDomainNames</b>;<br />
    <div class="availability">
<b>Availability:</b> OpenStep</div>
<br />
    <div class="desc">
      
            Returns an array listing the name of all the
            volatile domains.
          
    </div>
    <hr width="25%" align="left" />
</div>
    <br />
    <a href="Base.html">Up</a>
    </font>
</body>
</html>