• 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
Re: Listing only unique attributes in a set of Core Data Objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Listing only unique attributes in a set of Core Data Objects


  • Subject: Re: Listing only unique attributes in a set of Core Data Objects
  • From: "Fletcher T.Penney" <email@hidden>
  • Date: Fri, 27 May 2005 07:57:05 -0400


On May 26, 2005, at 11:21 PM, mmalcolm crawford wrote:


There does not appear to be a means of telling Core Data to deliver  
"the first person to have each firstName" out of all the people in  
the database.   Is there a way to do this within the Core Data  
realm itself, or will it require a custom function to scan each  
person, and remove the duplicates sharing a given firstName (or  
lastName, etc)???


Do you need to do this with a fetch, or is it not "live" based on  
what's "in the user interface" already (i.e. you're actually  
filtering)?  If you're actually filtering, you can probably use  
@distinctUnionOfObjects.firstName somewhere along the line...

mmalc

You're right - this is done "live" within the interface.  Thanks for the tip about @distinctUnionOfObjects!!!!

I was able to get the concept to work within a ComboBox by setting:

    content  to email@hiddenName of my NSArrayController (built from the Core Data)

and

    contentValues to email@hiddenName of  the same array controller



This works perfectly, but I have been unsuccessful in getting the same thing to work within a single column table.  I tried using the @distinctUnionOfObjects.firstName bit at various locations within the tableview and the column, as well as by attempting to create a new arraycontroller built using @distinctUnionOfObjects.firstName.

Depending on what I try, I get various errors of the sort:

this class is not key value coding-compliant for the key @distinctUnionOfObjects.


Once I have a ComboBox working, what needs to be done differently for a table? 


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

References: 
 >Listing only unique attributes in a set of Core Data Objects (From: "Fletcher T. Penney" <email@hidden>)

  • Prev by Date: Re: NSScrollView problems in Tiger
  • Next by Date: Catch keyboard input?
  • Previous by thread: Re: Listing only unique attributes in a set of Core Data Objects
  • Next by thread: Document Types
  • Index(es):
    • Date
    • Thread