Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EOSortOrdering error



The code below shows my attempt to sort an NSArray of EOs after a fetch. But
I'm getting the following error:

DirectAction.java:97:
sortedArrayUsingKeyOrderArray(com.webobjects.foundation.NSArray,com.webobjec
ts.foundation.NSArray) in com.webobjects.eocontrol.EOSortOrdering cannot be
applied to 
(com.webobjects.foundation.NSArray,com.webobjects.eocontrol.EOSortOrdering)

Can anyone see an error in my coding?



// array to hold fetch
NSArray logInfo;

// create sort order to sort array in memory
EOSortOrdering byDateDesc = EOSortOrdering.sortOrderingWithKey("dateTime",
EOSortOrdering.CompareDescending);
// create mutable array to hold results of sort
NSMutableArray logInfoSorted = new NSMutableArray();

// fetch data
logInfo = ec.objectsWithFetchSpecification(logFetchSpec);
// if there is data, sort it
if(logInfo.count() != 0) {
    logInfoSorted =  EOSortOrdering.sortedArrayUsingKeyOrderArray(logInfo,
byDateDesc);
}




-- 
Randall Perry
sysTame

Xserve Web Hosting/Co-location
Website Design/Development
WebObjects Hosting
Mac Consulting/Sales

http://www.systame.com/
_______________________________________________
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.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.