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

Possible NSPredicateEditor bug


  • Subject: Possible NSPredicateEditor bug
  • From: Tom <email@hidden>
  • Date: Fri, 3 Jul 2009 12:26:33 +1000

Hi everyone,

I'm either doing something wrong, or I've found a bug in NSPredicateEditor.

Whenever I use setObjectValue: on the NSPredicateEditor, it displays the new predicate, but if I change a couple of the operators (is, contains, begins with, etc) the text fields on the rows disappear.

Screenshot: http://www.tomdalling.com/wp-content/Picture-1.png
Demo project: http://www.tomdalling.com/wp-content/PredicateEditorBug.zip

Here is the relevant code:

-(IBAction) setPredicateEditorObjectValue:(id)sender
{

NSPredicate* single = [NSPredicate predicateWithFormat:@"name == 'test'"];

	NSMutableArray* subpredicates = [NSMutableArray array];
	[subpredicates addObject:[[single copy] autorelease]];
	[subpredicates addObject:[[single copy] autorelease]];
	[subpredicates addObject:[[single copy] autorelease]];
	[subpredicates addObject:[[single copy] autorelease]];	

NSPredicate* compound = [NSCompoundPredicate orPredicateWithSubpredicates:subpredicates];

	[m_predicateEditor setObjectValue:compound];

}

Am I doing something wrong?

--Tom
_______________________________________________

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: Possible NSPredicateEditor bug (found workaround)
      • From: Tom <email@hidden>
  • Prev by Date: Re: User interface validation doesn't work, right?
  • Next by Date: Re: Sorting on a table view of a managed object - debugger throws exception
  • Previous by thread: Re: disabling grammar checking
  • Next by thread: Re: Possible NSPredicateEditor bug (found workaround)
  • Index(es):
    • Date
    • Thread