VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /usr/share/doc/gnustep-base-doc/Base/Reference/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/doc/gnustep-base-doc/Base/Reference/NSUserDefaults.html
<!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>Copyright:</b> (C) 1995-2016 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>

VaKeR 2022