Re: NSArrayController bindings -- duplicate data? [SOLVED]
Re: NSArrayController bindings -- duplicate data? [SOLVED]
- Subject: Re: NSArrayController bindings -- duplicate data? [SOLVED]
- From: Ben Lachman <email@hidden>
- Date: Thu, 12 Oct 2006 02:03:42 -0400
Figured it out. -awakeFromNib gets called on the owner object of a
nib when it is loaded, so when I loaded the Nib which contained the
ArrayController, my app delegate's awakeFromNib was getting called
(it was set to the file's owner of the loaded nib). I was loading my
units array from file there and so I'd blow away the original array
with the data from disk, breaking the binding.
->Ben
On Oct 6, 2006, at 2:25 PM, Ben Lachman wrote:
I have an set of unit types in my app which are managed by a fairly
simple controller. I also have a master-detail interface in my
preferences for changing the display name of units (for instance
gal. instead of gallon). I'm using an NSArrayController to fill
this interface and it is bound to my unit controller's set (data
key path is "unitController.units" bound to my app delegate). The
problem is that it seems the Array Controller is copying the set,
so when I try to read a value elsewhere in my app after I have
changed it in the preferences I get the old data. Any ideas what I
might be doing wrong?
->Ben
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden