setNumberOfObjects in an NSArray
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