title: NSPredicate: Search on NSNumber (Cocoa)
body: <p>I  have an Cocoa Core-Date Application. I added a search field and bound it. Now, I have tried to add some predicates but failed! Here are my two questions:</p>
  
  <p>First, the predicate should filter NSNumbers but I cannot build a working predicate. My try:</p>
  
  <pre><code>keyPath == [NSNumber numberWithInteger:[$value integerValue]]
  </code></pre>
  
  <p>(keyPath represents a NSNumber which stores an integer.)</p>
  
  <p>Second, I want to have a predicate which searches in two attributes. The first attribute is firstName and the other lastName. So, if the user types "John Appleseed" he gets an result but with my tries I only get firstName or lastName.</p>
  
  <p>Thanks for your help, if there are any questions ask them. I dont know if I described my problem detailed enough ;-)</p>
  
  <p>Dennis</p>