• 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
Re: Binding popup contents difficulties [REVISITED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding popup contents difficulties [REVISITED]


  • Subject: Re: Binding popup contents difficulties [REVISITED]
  • From: Matt Neuburg <email@hidden>
  • Date: Wed, 31 May 2006 07:21:04 -0700
  • Thread-topic: Binding popup contents difficulties [REVISITED]

On Wed, 31 May 2006 03:50:34 -0400, Ken Tozier <email@hidden> said:
>Although I can get popup bindings working if all I use is an array of
>strings, what I'd really like to do is store an array of dictionaries
>in my model and have the menu display a specific field from each
>dictionary.
>
>Here's the dictionary array structure in my model:
>sites (
> {id=1, name='Boston', state='Masachusetts'},
> {id=2, name='New York',  state='New York'},
> {id=1, name='Chicago', state='Illinois},
> {id=1, name='Los Angeles', state='California'},
> etc...
>)
>
>Here are the popup bindings I'm attempting in the IB inspector palette:
>Value Selection:
> contentValues:
>  Bind to: PopupArrayController
>  Controller Key: arrangedObjects
>  Model Key path: name

Step 1: Start with an NSPopUpButton and an NSArrayController.

Step 2: Bind the NSPopUpButton to the NSArrayController in three ways: its
content (to arrangedObjects), its contentValues (to arrangedObjects.name),
and its selectedIndex (to selectionIndex).

Step 3: There is no step 3. m.

--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>



 _______________________________________________
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: Binding popup contents difficulties [REVISITED]
      • From: Ken Tozier <email@hidden>
  • Prev by Date: [OBJC Newbie] - MD5 Digest
  • Next by Date: Re: [OBJC Newbie] - MD5 Digest
  • Previous by thread: Re: [OBJC Newbie] - MD5 Digest
  • Next by thread: Re: Binding popup contents difficulties [REVISITED]
  • Index(es):
    • Date
    • Thread