if (choices == null)
log.warn("Choices was null for the list. For now this means that an empty list will appear.");
// FIXME: Might want to just fetch all of the eos if a choice isn't specified.
NSArray nonLocallist = choices == null ? ERXConstant.EmptyArray : (NSArray)valueForKeyPath(choices);
if (nonLocallist!=null) {
for (Enumeration e=nonLocallist.objectEnumerator(); e.hasMoreElements();) {
nonSortedLocalList.addObject(EOUtilities.localInstanceOfObject(objectContext, (EOEnterpriseObject) e.nextElement()));
}
NSArray sortArray=new NSArray(new EOSortOrdering(choicesSortKey(),
EOSortOrdering.CompareAscending));
_list=EOSortOrdering.sortedArrayUsingKeyOrderArray(nonSortedLocalList, sortArray);