Re: Binding popup contents difficulties [REVISITED]
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