title: Problem with NSSortDescriptor using custom comparator via selector
body: <p>I want to use a sortdescriptor with a custom comparator</p>
  
  <pre><code>NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] 
      initWithKey:@"object.dateTime" 
      ascending:YES 
      selector:@selector(compareObject:toObject:)];
  </code></pre>
  
  <p>(the key is a ManagedObject)</p>
  
  <p>Comparator method:</p>
  
  <pre><code>- (NSComparisonResult)compareObject:(id)date1 toObject:(id)date2 {
      NSComparisonResult comparisonResult;
      // Complex comparator contents
      return comparisonResult;
  }
  </code></pre>
  
  <p>However, I get an error:
  'NSInvalidArgumentException ', reason: '-[__NSDate compareObject:toObject:]: unrecognized selector sent .....</p>
  
  <p>What am I doing wrong?
  The comparator works if I use it in a block, but I need it to work via a selector.
  I can't find any example code or clear documentation on how to use comparators via a selector (for iOS 3.x.x). The documentation talks about comparing to self, but I've tried to incorporate the compare method in object, but that didn't work either.</p>
  
  <p>Who can point me to my problem or to some example code as to how to use this via a selector?</p>
  
  <p>Note: The comparator itself is not a simple date comparison. There is a lot more going on in there.</p>