FROM : Gerriet M. Denkmann
DATE : Mon Jun 02 18:08:10 2008
On 2 Jun 2008, at 16:52, <email_removed> wrote:
>
> On Sun, Jun 1, 2008 at 9:10 PM, Gerriet M. Denkmann
> <<email_removed>> wrote:
>> Following your suggestion, I changed my predicateFormat to:
>> @"%@ contains kMDItemTextContent" which translates into:
>> <kMDItemTextContent IN "To be, or not to be"> and behaves more or
>> less
>> exactly like LIKE.
>>
>> So again: how to search kMDItemTextContent for a string containing
>> spaces?
>> (10.4.11).
>
> This came up in the last question you asked. You're not constructing
> your formats properly.
>
> [NSPredicate predicateWithFormat:@"%K contains %@",
> kMDItemTextContent, @"To be, or not to be"]
Constucting the format properly (copying your suggestion):
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"%K
contains %@", kMDItemTextContent, @"To be, or not to be"];
results in:
[...] Exception raised during posting of notification. Ignored.
exception: NSComparisonPredicate with left expression which is not
NSKeyPathExpressionType given to NSMetadataQuery ("To be, or not to
be" IN kMDItemTextContent)
So: what am I doing wrong?
Kind regards
Gerriet.
DATE : Mon Jun 02 18:08:10 2008
On 2 Jun 2008, at 16:52, <email_removed> wrote:
>
> On Sun, Jun 1, 2008 at 9:10 PM, Gerriet M. Denkmann
> <<email_removed>> wrote:
>> Following your suggestion, I changed my predicateFormat to:
>> @"%@ contains kMDItemTextContent" which translates into:
>> <kMDItemTextContent IN "To be, or not to be"> and behaves more or
>> less
>> exactly like LIKE.
>>
>> So again: how to search kMDItemTextContent for a string containing
>> spaces?
>> (10.4.11).
>
> This came up in the last question you asked. You're not constructing
> your formats properly.
>
> [NSPredicate predicateWithFormat:@"%K contains %@",
> kMDItemTextContent, @"To be, or not to be"]
Constucting the format properly (copying your suggestion):
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"%K
contains %@", kMDItemTextContent, @"To be, or not to be"];
results in:
[...] Exception raised during posting of notification. Ignored.
exception: NSComparisonPredicate with left expression which is not
NSKeyPathExpressionType given to NSMetadataQuery ("To be, or not to
be" IN kMDItemTextContent)
So: what am I doing wrong?
Kind regards
Gerriet.
| Related mails | Author | Date |
|---|---|---|
| Gerriet M. Denkman… | Jun 1, 16:17 | |
| stephen joseph but… | Jun 1, 17:24 | |
| Gerriet M. Denkman… | Jun 2, 04:10 | |
| stephen joseph but… | Jun 2, 07:20 | |
| Gerriet M. Denkman… | Jun 2, 18:08 | |
| stephen joseph but… | Jun 2, 22:30 | |
| Gerriet M. Denkman… | Jun 3, 02:37 | |
| stephen joseph but… | Jun 3, 04:59 | |
| Gerriet M. Denkman… | Jun 3, 10:18 | |
| Hamish Allan | Jun 3, 10:33 | |
| Gerriet M. Denkman… | Jun 3, 11:23 | |
| Jason Wiggins | Jun 3, 16:27 | |
| Hamish Allan | Jun 3, 17:16 |






Cocoa mail archive

