Bind to element in dictionary in array
Bind to element in dictionary in array
- Subject: Bind to element in dictionary in array
- From: Trygve Inda <email@hidden>
- Date: Wed, 28 Jun 2006 16:43:30 +0000
- Thread-topic: Bind to element in dictionary in array
Hi All,
My app is a system preference pane and I am trying to set up bindings. My
layout is as such:
Dict
- someValueA
- someValueB
- someValueC
--- Array (key: MyArray)
- Dict (element 1)
- someBoolValueD
- someBoolValueE
- Dict (element 2)
- someBoolValueD
- someBoolValueE
--- (End of Array)
So, it's easy to bind to the first part with dict.someValueA, but how do I
notate a bind to a element in the array? (in Interface Builder)
dict.MyArray[index].someBoolValueD <- this does not seem to work
My code looks like:
NSMutableDictionary *mainDisplay; // local dict for element 1 in array
dict = [[NSMutableDictionary alloc] init]; // dict is global to my pref pane
// make an array and add a dictionary element
displays = [[NSMutableArray alloc] init];
mainDisplay = [[NSMutableDictionary alloc] init];
[displays addObject:mainDisplay];
// now insert the array into my master dictionary
[dict setObject:displays forKey:@"MyArray"];
Any ideas on binding to the elements of a dictionary that are in an array?
Thanks,
Trygve
_______________________________________________
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