Binding to object at index in NSArrayController?
Binding to object at index in NSArrayController?
- Subject: Binding to object at index in NSArrayController?
- From: daniel <email@hidden>
- Date: Tue, 12 Apr 2005 16:58:40 -0700
I have to admit I'm still learning bindings, ever so slowly. Hopefully
one day soon I'll have my "click moment." I'm trying to apply bindings
to a new, rather simple project I'm working on, and an issue has come
up.
Is there any way to bind to an object managed by NSArrayController by
specific index? Binding to the selection of the controller is great for
a "master-detail" interface, but what if I have a different use in mind
for the contents?
Basically what I'm trying to do is access one of two dictionaries
stored in an array in my user defaults. At this point, there can only
ever be two of these dictionaries, but I want to package them as an
array of dictionaries because I anticipate that changing in the future.
I thought I'd package them as an array from the start to avoid having
to "convert preferences" in a future release. I have an
NSArrayController set up to manage the two-item array.
Any suggestions for how I might accomplish this? There isn't any magic
"key value" for accessing the contents of an array, is there? In my
fantasy world I'm thinking of something like being able to bind to
contentArray with a key path of "1", or something.
Thanks,
Daniel
_______________________________________________
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