• 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
Different behaviour of like and contains in predicates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Different behaviour of like and contains in predicates


  • Subject: Different behaviour of like and contains in predicates
  • From: Theo Vosse <email@hidden>
  • Date: Wed, 28 Sep 2005 16:57:51 +0200

Hi,

I've got an array controller and a table (two columns, bound to the controller, let's call their key paths p1 and p2) and a search field with three predicates set up in IB. The first one (call "All") uses "contains" to search all fields, so (p1 contains[cd] $value) OR (p2 contains[cd] $value). Now I wanted to add a more powerful search facility, so I added a second predicate p1 like[cd] $value and a third one, p2 like[cd] $value.

The strange thing is that in particular the last predicate doesn't work properly. E.g., if I type *wh* (and there are plenty of entries containing "wh"), the whole table goes blank. When I add another space and then delete that space, the correct entries show up. There is no such problem when I replace "like" by "contains".

Anybody an idea how to overcome this, or what causes this rather odd behaviour? Thanks,

    Theo Vosse
_______________________________________________
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: Core Data App vs. Core Data Doc-based App: which is appropriate?
  • Next by Date: Re: Visual alignment problems when using NSText drawAtPoint:withAttributes
  • Previous by thread: NSRulerView
  • Next by thread: Cocoa + NATPMP
  • Index(es):
    • Date
    • Thread