• 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
NSPredicateEditor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPredicateEditor


  • Subject: NSPredicateEditor
  • From: Chris <email@hidden>
  • Date: Thu, 26 Jun 2008 12:27:40 +1000

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 (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSPredicateEditor
      • From: Peter Ammon <email@hidden>
  • Prev by Date: Re: Auto pop-up list from State field in Address book database
  • Next by Date: Re: Newbie question: error in creating a NSData object using handle (Resource Management)
  • Previous by thread: Re: NSPredicateEditor
  • Next by thread: Re: NSPredicateEditor
  • Index(es):
    • Date
    • Thread