• 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
setNumberOfObjects in an NSArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

setNumberOfObjects in an NSArray


  • Subject: setNumberOfObjects in an NSArray
  • From: Dev WO <email@hidden>
  • Date: Tue, 2 Aug 2005 20:10:45 +0200

Hi list,
this might be something trivial, but I'm searching for it for a couple days now, and can't really find the answer...
Actually I'm using a NSArray and not a WODisplayGroup. I'm not very familiar with WODisplayGroup and will learn more about it, but I'd like to know how to do it using an NSArray.
Here's the context:
I've got a list of news, they've got datePosted and dateLastUpdated attributes.
I've created another attribute in the News.java files which is globalDate. The globalDate is equal to the datePosted if dateLastUpdated is null and dateLastUpdated is there's one.
The reason I've created this attribute is because I wanted the news to be sorted using the globalDate and not the datePosted.


But because of globalDate, I cannot use:
setFetchLimit() because it would limit the number of rows before the sorting.
so I'm ok to sort all the news and then only display the first X.


Does anyone know how to do something like setNumberOfObjects on an NSArray?
Or maybe I missed something a lot before, for example if I was able to request a fetch already sorted like the globalDate does it?
That would solved all my problems and allow for using the setFetchLimit (and most probably prevent me from having database slowdown when many news are fetched).


Thanks

Xavier

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: setNumberOfObjects in an NSArray
      • From: LD <email@hidden>
    • Re: setNumberOfObjects in an NSArray
      • From: David LeBer <email@hidden>
  • Prev by Date: Re: EditingContext problem, ghost entry in datastore [ was Debuging WOManyToManyRelationship]
  • Next by Date: Re: setNumberOfObjects in an NSArray
  • Previous by thread: Re: EditingContext problem, ghost entry in datastore [ was Debuging WOManyToManyRelationship]
  • Next by thread: Re: setNumberOfObjects in an NSArray
  • Index(es):
    • Date
    • Thread