Consider the following code, any NSPredicateEditor gurus:

NSPredicateEditorRowTemplate *tmpTemplate =

    [[NSPredicateEditorRowTemplate alloc]

       initWithCompoundTypes: [NSArray

            arrayWithObjects: [NSNumber numberWithInt: NSNotPredicateType],
nil]];

NSPredicate * tmpPredicate = [NSPredicate predicateWithFormat:@"mykey =
'foo'"];

NSPredicate * tmpCompPredicate = [NSCompoundPredicate
notPredicateWithSubpredicate:tmpPredicate];

double result = [tmpTemplate matchForPredicate:tmpCompPredicate];

NSLog(@"RESULT: %f", result);


This code prints 0.0.


The net effect is that NSPredicateEditor can't display a predicate like

NOT (foo = "bar")


A bug in NSPredicateEditor system perhaps? But surely someone would have
seen it before.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to