NSPredicateEditorRowTemplate showing key path with spaces?

As in the previous question, I reluctantly refused to use IB / Xcode4 to edit NSPredicateEditor and did it exclusively in code.

In the way of editing fields in the GUI, the path to the keys can be specified with spaces, such as the "field name", and this makes them work as the paths of the "fieldName" key, while preserving their display in the user interface with spaces. How to do this in code? When I specify them with spaces, they do not work. When I specify them in camelCase, they work, but are displayed in camelCase. I just add a bunch of NSExpress, for example:

[NSExpression expressionForKeyPath:@"original filename"]
+3
source share
1 answer

- NSRuleEditor NSPredicateEditor.

, , , .

, fileName, 2 (is contains), , . , :

"%[fileName]@ %[is]@ %@" = "%1$[fileName]@ %2$[is]@ %3$@";
"%[fileName]@ %[contains]@ %@" = "%1$[fileName]@ %2$[contains]@ %3$@";

, - :

"%[fileName]@ %[is]@ %@" = "%1$[original filename]@ %2$[is]@ %3$@";
"%[fileName]@ %[contains]@ %@" = "%3$@ %2$[is contained in]@ %1$[original filename]@";

, , , , , .

+3

All Articles