Bindings NSArrayController/NSUserDefaultsController nightmare
Bindings NSArrayController/NSUserDefaultsController nightmare
- Subject: Bindings NSArrayController/NSUserDefaultsController nightmare
- From: Drew McCormack <email@hidden>
- Date: Thu, 29 Jul 2004 15:11:07 +0200
I am just about on the verge of pulling out my hair --- it would be
more pleasurable than the last few hours I have spent with the
bindings layer!
Here's the problem: I have a table view with a single column, connected
to an NSArrayController. (I also have a text field and a + and - button
to add entries to the table, but that is beside the point). Testing
this in IB works fine.
I would like to archive the contents of the array controller in the
shared NSUserDefaults. So I have bound the contents of the array
controller to a key of NSUserDefaultsController.
This didn't work, because the user defaults have immutable containers,
and the array controller expects mutable ones. A search of the archives
revealed I should write a value transformer, that converts the array of
dictionaries in NSUserDefaults into a mutable array of mutable
dictionaries.
I've done this this, and I no longer get any error message. However, I
can't add anything to the table. This seems to have to do with the
conditionally editable checkboxes in the bindings.
Can anyone tell me what I might be doing wrong, or point me to an
example of what I want to do.
Drew
========================================
Dr. Drew McCormack (Kmr. R153)
Afd. Theoretische Chemie
Faculteit Exacte Wetenschappen
Vrije Universiteit Amsterdam
De Boelelaan 1083
1081 HV Amsterdam
The Netherlands
Email email@hidden
Web www.maniacalextent.com
Telephone +31 20 44 47623
Mobile +31 6 483 21307
Fax +31 20 44 47629
_______________________________________________
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.