How to implement a filter list
How to implement a filter list
- Subject: How to implement a filter list
- From: Gian Marc Cadosch <email@hidden>
- Date: Wed, 19 Oct 2005 08:20:57 +0200
I'm currently working on a wine database that uses almost the same gui elements
than iTunes. There's a list of wines on the right side and three list boxes on
the right side to filter the main list.
For not complicating the question, I only describe two entities used for this
particual problem: wine and country with a relationship between them. The wine
list is (main view) is filled with the wine objects using bindings.
Now the problem: I'd like to fill one of the filter lists with the country names
used in objects of the entity wine, that means the list should be filtered, not
all objects of country. And there should be an item "All Countries" on top of
the list. Of course the other items should be sorted by name.
What would be the best method to implement that? I could bind the country
controller to the list and filter it using a predicate saying that only
countries with 1 or more related wines should pass. But how would I then
implement the "All Countries" item?
Or is it better to implement a custom array controller and manually fill it with
the country names running through the wine array controller? So I could easily
set up the "All Countries" item at the beginning, but overall more coding is
needed.
Marc
_______________________________________________
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