Possible NSPredicateEditor bug
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