Re: NSArrayController, bindings and NSUserDefaults

2008-11-09 Thread Andre Masse
Thanks for your reply, I was using NSKeyeyArchiver to encoded my custom object. Didn't know about NSUnarchiveFromData though. Couldn't find it in Apple documentation neither. Anyway, I moved to a much simpler version which bypass using a custom class. It's now an array of NSMutableDictionar

Re: NSArrayController, bindings and NSUserDefaults

2008-11-09 Thread Volker in Lists
Hi, you need an formatter - NSUnarchiveFromData and then it works rather well. I store supplementary information that each user can edit in NSUserDefaults. The info is maintained in NSTableViews and stored as an Array of NSMutableDictionary. Works really well. Volker Am 09.11.2008 um 20:

Re: NSArrayController, bindings and NSUserDefaults

2008-11-09 Thread Andre Masse
Thanks a lot for your example Steven. I'm probably over thinking this. I'll just use IB, no custom class, no encoding no trouble :-) Thanks again, Andre Masse On Nov 9, 2008, at 15:13, Steven Riggs wrote: Check out a code sample (using no code, just IB)... http://idisk.mac.com/steven.rig

Re: NSArrayController, bindings and NSUserDefaults

2008-11-09 Thread Steven Riggs
Check out a code sample (using no code, just IB)... http://idisk.mac.com/steven.riggs-Public?view=web -Steve On Nov 9, 2008, at 2:41 PM, Andre Masse wrote: Thanks for your reply Steven, I've tried that but no luck. I get the following error: [ valueForUndefinedKey:]: this class is not key

Re: NSArrayController, bindings and NSUserDefaults

2008-11-09 Thread Andre Masse
Thanks for your reply Steven, I've tried that but no luck. I get the following error: [ valueForUndefinedKey:]: this class is not key value coding-compliant for the key userName. In interface builder, you will need an Array controller done. Mode: ClassClass Name:NSMutableDictionary

Re: NSArrayController, bindings and NSUserDefaults

2008-11-09 Thread Steven Riggs
This worked for me... In interface builder, you will need an Array controller Mode: ClassClass Name:NSMutableDictionary Content Array bound to Shared User Defaults Controller - controller key:values - modal key path:yourDefaultsKey Make sure handles content as a compound value is checked

NSArrayController, bindings and NSUserDefaults

2008-11-09 Thread Andre Masse
Hi, I'm having difficulties binding (in IB) my application's preferences to NSUserDefaults. It's easy to bind simple values, but not so when using composite objects in an array where each element is an object archived as NSData with NSKeyedArchiver. Further more, when the object has anoth