discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPredicate


From: Richard Frith-Macdonald
Subject: Re: NSPredicate
Date: Fri, 31 Oct 2008 23:49:14 +0000


On 31 Oct 2008, at 20:20, Fred Kiefer wrote:

Samantha Rahn wrote:
What types of syntax can and cannot be used in NSPredicate?

When I use

   companyName CONTAINS 'Corp'

I get:

   NAME:NSInvalidArgumentException REASON:Format string contains
extra characters: "companyName CONTAINS 'Corp'"


I had a look at the source code and it looks like we are missing code
for the parsing of string constants. Somebody will have to add this.

Looked simple, so I added it ... try svn trunk to see if it works.

The whole file NSPredicate.m needs a make over, we should split it up
and replace the current scanner with something more powerful.

What is needed? The current NSScanner based implementation has lots of method call overheads and is obviously going to be slower than something similar written in pure C, but it's not obvious to me that it's less powerful (and it has the advantage of re-using reliable code). I'm not familiar with NSPredicate though, so I could easily be missing some disadvantage.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]