if(browserSelection()!=null){
NSArray sortedObjects=relationshipDisplayGroup.displayedObjects();
// make the compiler happy
sortedObjects.count();
int selectedIndex = ((Integer)browserSelection().valueForKey(indexKey())).intValue();
EOEnterpriseObject lastObject =
(EOEnterpriseObject)relationshipDisplayGroup.displayedObjects().lastObject();
int lastIndex =
((Integer)lastObject.valueForKey(indexKey())).intValue();
if(selectedIndex!=lastIndex){
objectAtIndex(selectedIndex+1).takeValueForKey(Integer.valueOf(selectedIndex),
indexKey());
browserSelection().takeValueForKey(Integer.valueOf(selectedIndex+1),
indexKey());