• 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
Source Table & Bindings Design Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Source Table & Bindings Design Question


  • Subject: Source Table & Bindings Design Question
  • From: SA Dev <email@hidden>
  • Date: Mon, 1 Aug 2005 10:37:00 -0400

Hello:

I have a setup similar to iTunes' browser I'm trying to get working. I have an entity called Publisher with a to-many relationship to Genre and Format entities. The iTunes-like browser allows you to select one or more Genres and Formats, then shows the matching (filtered) Publishers. I'm using Core Data and Bindings.

I'm trying to determine the best Core-Data/Bindings-friendly way to implement this list while adding the ubiquitous "All Genres" and "All Formats" choice at the top.

At this point, I'm thinking the best option would be to use the datasource approach and rebuild my source lists when the managed object context changes (by registering my data source for NSManagedObjectContextObjectsDidChangeNotification).

This would probably allow me to specify that if you have several selections and try to extend the selection to include the "All" option, that everything but "All" is deselected (since you don't want the confusing "Return all objects of a genre and objects of these specific genres" behavior).

The datasource could automatically rebuild the filter predicate when the selection changes (to which I could bind the final publishers list's filterPredicate binding).

The toughest question I've got now is how to handle the "All" object in the data source's array. I could use NSDictionaries to provide the genre's name and its managed object ID, then just add a dictionary with the name "All Genres" with "NSNull" as the object ID. I know that popups' bindings work this way to allow nil values.

... so my question, I guess, is whether or not the above is a good approach to this situation.


_______________________________________________ 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
  • Prev by Date: ANN: Drag and drop from Mail into your application
  • Next by Date: MEETING: Chicago - Tuesday, August 2nd
  • Previous by thread: ANN: Drag and drop from Mail into your application
  • Next by thread: MEETING: Chicago - Tuesday, August 2nd
  • Index(es):
    • Date
    • Thread