• 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: Accessing elements of an Array using a flat Key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing elements of an Array using a flat Key


  • Subject: Re: Accessing elements of an Array using a flat Key
  • From: Jonathan Rochkind <email@hidden>
  • Date: Mon, 16 Feb 2004 10:39:23 -0600

There's a step in between "by hand" and using EOSortOrdering. If EOSortOrdering won't do what you need to do, see NSComparator. Which provides a very flexible method of sorting, using a built-in sorting method that you don't need to write yourself (see NSArray.sortedArrayUsingComparator), but, if neccesary, providing your own NSComparator implementation to define how to tell if an object is "greater than" another object or not.

--Jonathan

At 2:29 AM -0500 2/15/04, Alex Eiser wrote:
Hi,

This is probably a dead end, but I wanted to check anyway.

I am working on an application to handle course enrollments and marks.
One of the key features needs to be to sort a class by marks achieved.

Out database structure is done so that each course can have a varying
number of mark items. Since we want to be able to sort the class by any
mark item this presents a problem.

In most cases I perform my sorting by using
"EOSortOrdering.sortArrayUsingKeyOrderArray(enrollList,
sortOrderings);" were sortOrderings is defined using
"EOSortOrdering.sortOrderingWithKey(aKey, aSelector);"  The problem is
I need to be able to specify a key which specifies which entry of the
mark items is to be used.

Since their are many markItems for a single student I can't just use
the relationship.

Is there any way to specify a specific item of a 1-many relationship?
Or do i need to perform the sorting by hand?

Thanks,

Alex

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Access bindings at runtime (From: David Griffith <email@hidden>)
 >Re: Access bindings at runtime (From: Chuck Hill <email@hidden>)
 >Accessing elements of an Array using a flat Key (From: Alex Eiser <email@hidden>)

  • Prev by Date: Re: fetching from a number of entity subclasses simultaneously
  • Next by Date: Personalizing Error Page
  • Previous by thread: Accessing elements of an Array using a flat Key
  • Next by thread: Advice on Project Approach - Single or Multiple Apps?
  • Index(es):
    • Date
    • Thread