bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #24807] NSUserDefaults doesn't support KVC


From: Richard Frith-Macdonald
Subject: [bug #24807] NSUserDefaults doesn't support KVC
Date: Tue, 11 Nov 2008 07:06:06 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1

Update of bug #24807 (project gnustep):

                  Status:                    None => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

I implemented the trivial valueForKey: and setValue:forKey: methods ...though
it's not entirely clear that NSUserDefaults should be KVC complient.

I couldn't find any documentation saying that the class is KVC complient in
MacOS-X, and I did find a couple of comments on the web from people saying
they thought it wasn't.
I also found this page ...
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/NSUserDefaultsController.html

At the end it says:
The NSUserDefaultsController method values returns a KVC-compliant object
that is used to access these default values. To get the value of a default,
use the valueForKey: method.

[[theDefaultsController values] valueForKey:@"userName"];

which seems to imply that NSUserDefaults is not KVC compliant (as it needs
this special KVC-compliant object to access it).

However, your test program returns a value when I run it on MacOS-X, so it
seems likely that Apple have added KVC as an undocumented feature, or are in
the process of adding it.



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?24807>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]