• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Bind to element in dictionary in array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Bind to element in dictionary in array
      • From: George Orthwein <email@hidden>
  • Prev by Date: Re: Executing non objective-c code in a loaded bundle
  • Next by Date: Re: Bind to element in dictionary in array
  • Previous by thread: problem debugging Core Data
  • Next by thread: Re: Bind to element in dictionary in array
  • Index(es):
    • Date
    • Thread