Re: Some help with NSComparisonPredicate please

2017-02-17 Thread sqwarqDev
> On 17 Feb 2017, at 22:35, sqwarqDev wrote: > > mdfind on the command line returns all the results from the /Application > Support folder. NSMetadataQuery doesn’t return anything at all. Search scope is set to NSMetadataQueryLocalComputerScope in case anyone was going

Re: Some help with NSComparisonPredicate please

2017-02-17 Thread sqwarqDev
> On 17 Feb 2017, at 22:25, Keary Suska wrote: > > The correct syntax is probably: > > kMDItemFSName ==[c] *%@* > Yeah, I’ve just been playing with that since my last post. Indeed, I discovered that the docs claim that this should be equivalent to contains:

Re: Some help with NSComparisonPredicate please

2017-02-17 Thread Keary Suska
> On Feb 17, 2017, at 7:41 AM, sqwarqDev wrote: > > So eventually I discovered that this question has a history. Back in 2008 > Keary and Garriet discussed this: > >

Re: Some help with NSComparisonPredicate please

2017-02-17 Thread sqwarqDev
So eventually I discovered that this question has a history. Back in 2008 Keary and Garriet discussed this: http://webcache.googleusercontent.com/search?q=cache:HXWdzJeGeDcJ:www.cocoabuilder.com/archive/cocoa/208612-nspredicate-containing-contains.html+=4=th=clnk=th=safari Alas, none of that

Re: Some help with NSComparisonPredicate please

2017-02-17 Thread sqwarqDev
Suggestions from Shane and Steve: > Use LIKE instead of CONTAINS? Yeah, that was my first thought. Alas, it doesn’t return the correct results. > Try quoting the right side? "kMDItemFSName contains[cd] '%@‘" Doesn’t return the correct results in 10.11. There aren’t any spaces in my actual

Re: Some help with NSComparisonPredicate please

2017-02-16 Thread Shane Stanley
On 17 Feb 2017, at 10:54 am, sqwarqDev wrote: > > Still looking for help with this, if anyone’s got any idea? Use LIKE instead of CONTAINS? -- Shane Stanley , ___ Cocoa-dev mailing list

Re: Some help with NSComparisonPredicate please

2017-02-16 Thread Steve Mills
On Feb 16, 2017, at 17:54, sqwarqDev wrote: > > Still looking for help with this, if anyone’s got any idea? > >> On 15 Feb 2017, at 22:50, sqwarqDev wrote: >> >> Building with Xcode 7.3.1, macOS 10.11.6 >> >> I’m using an NSPredicate with the form:

Re: Some help with NSComparisonPredicate please

2017-02-16 Thread sqwarqDev
Still looking for help with this, if anyone’s got any idea? > On 15 Feb 2017, at 22:50, sqwarqDev wrote: > > Building with Xcode 7.3.1, macOS 10.11.6 > > I’m using an NSPredicate with the form: > > NSString *targetString = @“some string or other”; > NSPredicate

Some help with NSComparisonPredicate please

2017-02-15 Thread sqwarqDev
Building with Xcode 7.3.1, macOS 10.11.6 I’m using an NSPredicate with the form: NSString *targetString = @“some string or other”; NSPredicate *searchPredicate = [NSPredicate predicateWithFormat:@"kMDItemFSName contains[cd] %@“, targetString]]; When I build and run my app, this runs fine on