• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Predicate oddness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Predicate oddness


  • Subject: Predicate oddness
  • From: Timothy Larkin <email@hidden>
  • Date: Fri, 11 Nov 2005 16:17:17 -0500

I have an NSSearchField with a set of predicates bound to an array controller. The controller's entity has a string field named title. If I want to find all the titles that have a substring "foo", the documentation and examples I have found suggest I can write "title contains[c] $value" as the predicate format in IB. Entering "foo" in the search field should produce a predicate that says, "title contains [c] 'foo'".

But it doesn't. If I print out the filter predicate in the controller's arrangeObjects method, it returns "'foo' IN title", which generates an exception.

How does the predicate format "title contains[c] $value" become "$value iN title"?


-- Timothy Larkin Abstract Tools Caroline, NY

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Classes used to render webview content (tags)
  • Next by Date: Select checkbox in NSTableView
  • Previous by thread: Re: Classes used to render webview content (tags)
  • Next by thread: Select checkbox in NSTableView
  • Index(es):
    • Date
    • Thread