Re: Core Data, Bindings, NSSearchField, and NSPopUpButton
Re: Core Data, Bindings, NSSearchField, and NSPopUpButton
- Subject: Re: Core Data, Bindings, NSSearchField, and NSPopUpButton
- From: Jamie Hardt <email@hidden>
- Date: Fri, 12 Sep 2008 18:44:20 -0700
On Sep 12, 2008, at 6:09 PM, Steve Mykytyn wrote:
It would be handy to add an NSPopupButton with the list of countries
to optionally restrict the search to a specific country while
looking for a city name in the searchfield, say. Can't seem to find
any relevant examples of this kind of thing with Core Data +
Bindings, where two interface items are controlling the search. I
prefer to keep the interface code to zero if possible.
Hi-
You will need an NSArrayController to hold a list of countries. You
should be able to create it by binding to your Locations array's
"email@hiddenries". That gives you a list of
countries to populate the NSArrayController for Countries, and then
you make the popup button's selection bound to a filter predicate on
your Locations array controller.
Jamie Hardt
The Sound Department
http://www.soundepartment.com/
http://www.imdb.com/name/nm0362504/
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden