• 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
@distinctUnionOfObjects and NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

@distinctUnionOfObjects and NSTableView


  • Subject: @distinctUnionOfObjects and NSTableView
  • From: "Fletcher T. Penney" <email@hidden>
  • Date: Sat, 28 May 2005 10:16:12 -0400

I would like to take an NSArrayController that is created from Core Data and use the arrangedObject's (I do a lot of nested predicate building to display only the desired values) to build a list of distinct properties to be placed in a single column table.

For example, for a Core Data object consisting of people, I want a separate table listing all _distinct_ first names (e.g. "John Smith" and "John Doe" should result in a single listing of "John")

I was able to get the concept to work within a ComboBox by setting the NSComboBox's content and contentValues to email@hiddenName of my NSArrayController (built from the Core Data).

It worked fine, but I don't want a ComboBox, I want a table. No matter what I try, I cannot get the same functionality to work within a table.

I have tried placing the @distinctUnionOfObjects bit in the table, and in a new NSArrayController, and within a custom function within a new subclass of NSArrayController, and am not making any headway.

I'm sure it's something simple but fundamentally different between the needs of a ComboBox and a TableView.


Thanks to mmalcolm crawford for getting me this far, and thanks to anyone who can point me in the right direction to getting a table working.


Fletcher

_______________________________________________
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: @distinctUnionOfObjects and NSTableView
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Using [NSWorkspace getFileSystemInfoForPath:...]
  • Next by Date: Re: "Arguments" dictionary in NSXML
  • Previous by thread: Using [NSWorkspace getFileSystemInfoForPath:...]
  • Next by thread: Re: @distinctUnionOfObjects and NSTableView
  • Index(es):
    • Date
    • Thread