nspredicateeditor

NSPredicateEditor row templates not configurable in interface builder

谁说我不能喝 提交于 2019-12-02 02:06:07
问题 I'm creating an assistant sheet in my storyboard in interface builder. The viewController contains an NSPredicateEditor and is connected to a property of the viewController using cocoa bindings. However, I'm not able to properly configure the row templates. When I uncheck one of the predicate operators, I'm not able to re-enable them, nor I'm able to use any of the other provided operators. Doesn't Xcode support NSPredicateEditor anymore, or am I doing anything wrong here? Just to be clear, I

NSPredicateEditor in Xcode 4

江枫思渺然 提交于 2019-12-01 05:13:36
Bit of an issue with Xcode 4's predicate editor controls - I think I'm doing everything right, and it really seems like the IDE itself is busted. I'm having this issue in an app I'm writing, but to isolate it, I did the following: Create a new project with a window. In the XIB editor, add an NSPredicateEditor to it, and add one line. Leave it as key paths/strings and add two key paths - "title" and "writer". Make it case and diacritical insensitive. Create a subclass of NSWindowController and add an IBOutlet for the predicate editor. In awakeFromNib, put the following code: NSPredicate

NSPredicateEditor & NSExpression - Can the display be different than the value for the predicate?

懵懂的女人 提交于 2019-12-01 04:58:26
I have a predicate editor, which the template was generate via the following: NSArray * test = [NSArray arrayWithObjects: [NSExpression expressionForKeyPath: @"Abc"], [NSExpression expressionForKeyPath: @"Def"], nil]; NSPredicateEditorRowTemplate * template = [[NSPredicateEditorRowTemplate alloc] initWithLeftExpressions: test rightExpressionAttributeType: NSStringAttributeType modifier: NSDirectPredicateModifier operators: [NSArray arrayWithObject: [NSNumber numberWithUnsignedInteger:NSContainsPredicateOperatorType]] options:(NSCaseInsensitivePredicateOption

NSPredicateEditor & NSExpression - Can the display be different than the value for the predicate?

懵懂的女人 提交于 2019-12-01 02:20:49
问题 I have a predicate editor, which the template was generate via the following: NSArray * test = [NSArray arrayWithObjects: [NSExpression expressionForKeyPath: @"Abc"], [NSExpression expressionForKeyPath: @"Def"], nil]; NSPredicateEditorRowTemplate * template = [[NSPredicateEditorRowTemplate alloc] initWithLeftExpressions: test rightExpressionAttributeType: NSStringAttributeType modifier: NSDirectPredicateModifier operators: [NSArray arrayWithObject: [NSNumber numberWithUnsignedInteger