• 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: Creating an ordered list for combo-box content from a Core Data entity attribute
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating an ordered list for combo-box content from a Core Data entity attribute


  • Subject: Re: Creating an ordered list for combo-box content from a Core Data entity attribute
  • From: "I. Savant" <email@hidden>
  • Date: Wed, 8 Apr 2009 17:02:41 -0400

On Wed, Apr 8, 2009 at 4:05 PM, Jon C. Munson II <email@hidden> wrote:

> I have a combo-box whose content needs to be the aggregated values of the
> attribute it is bound to.  Ideally, I'd like this sorted.
>
> Binding content/content values to @distinctUnionOfObjets.attribute yields an
> unordered list - not quite so friendly.

  Yes, this is a FAQ. Since Core Data deals in sets (NSSet /
NSMutableSet - by definition, unordered), you have to sort the list by
some attribute. Either an alphanumeric sort or if you want to allow
designation of an arbitrary order, you'll want to create a "sortOrder"
attribute.

> So, I've created a relevant method to fetch & load an ordered list.
>
> Now, I'd like to monitor that attribute for any change so I can re-load my
> list.

  What kind of attribute is it? It should be as easy as setting the
desired sort descriptors (see NSSortDescriptor and associated
companion guide(s)) on the array controller that's providing your
list.

--
I.S.
_______________________________________________

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

  • Follow-Ups:
    • Re: Creating an ordered list for combo-box content from a Core Data entity attribute
      • From: "I. Savant" <email@hidden>
References: 
 >Creating an ordered list for combo-box content from a Core Data entity attribute (From: "Jon C. Munson II" <email@hidden>)

  • Prev by Date: Re: noob: Question about senders and views
  • Next by Date: Re: Creating an ordered list for combo-box content from a Core Data entity attribute
  • Previous by thread: Creating an ordered list for combo-box content from a Core Data entity attribute
  • Next by thread: Re: Creating an ordered list for combo-box content from a Core Data entity attribute
  • Index(es):
    • Date
    • Thread