• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSArrayController with User Defaults
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSArrayController with User Defaults


  • Subject: NSArrayController with User Defaults
  • From: Johan Kool <email@hidden>
  • Date: Fri, 16 Apr 2004 11:38:49 +0200

Hello again,

In the same simple app I am trying to get the content of a NSArrayController saved into the user defaults. This seems to work when I test my interface in IB, but when I do it in my own app I get this error:

*** -[NSCFDictionary setObject:forKey:]: mutating method sent to immutable object

In my nib I've setup an NSArrayController as usual, and it works, but if I then set a binding for contentArray to Shared User Defaults with controller key "values" and model key path "someKey" and build my app, I will be able to add objects to the array controller, but I can't set a value for e.g. its key "title" (which is what I display in my associtated table view). If I try I get the error mentioned above.

Using a NSUserDefaultController instead of the Shared User Defaults gets me the same error. Also if I set the binding for contentObject instead of contentArray.

Any thoughts?

Thanks already again!

Johan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: NSArrayController with User Defaults
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Slider value display
  • Next by Date: Re: [now OT] Licensing/Implementing in Cocoa/Obj-C - Interest in product?
  • Previous by thread: Re: bindings and undo
  • Next by thread: Re: NSArrayController with User Defaults
  • Index(es):
    • Date
    • Thread