nspredicateeditor

NSPredicateEditor in Xcode 4

被刻印的时光 ゝ 提交于 2020-01-11 05:17:10
问题 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

Using NSPredicateEditor, is there a way to get all of the Finder search categories for free?

孤人 提交于 2019-12-25 07:49:08
问题 I'm adding an NSPredicateEditor to my app to allow the user to seach for specific files and categories of files. The default NSPredicateEditor template from Inteface Builder adds a control containing only "name", "address", and "sign" categories. I'm looking for more specific categories. I know that I can add menu items to these menus in Interface Builder, but I would greatly prefer not to maintain a list myself of all of the various categories and values for file searches. In Finder, a great

Forcing the display of a compound row with NSPredicateEditor

安稳与你 提交于 2019-12-22 06:57:04
问题 I'm creating an NSPredicateEditor in code and trying to achieve what I had hoped would be a fairly simple task. Basically, I would like to display a compound NSPredicateEditorRowTemplate (giving the user the option to perform matches when "All/Any/None of the following are true") and a number of fairly basic subrows beneath it. To do this, I construct my NSPredicateEditor and bind its value in order to save changes as the user edits their predicate. The issue I'm experiencing is that, no

Variable Substitution with FetchRequests stored in a CoreData Model

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 04:22:06
问题 I've always created my NSFetchRequests entirely in-code. Now I'm looking at the Xcode GUI for building a fetch request and storing it in the model. I'm following an example from the Xcode Documentation. I added a Fetch Request to my model, and the predicate that has been created through the Modelling GUI is: firstName LIKE[c] "*SUBSTRING*" I then retrieve that request with these two lines: NSDictionary *substituionDictionary = [NSDictionary dictionaryWithObject:@"woody" forKey:@"SUBSTRING"];

NSPredicateEditor row templates not configurable in interface builder

社会主义新天地 提交于 2019-12-11 06:07:26
问题 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

Configuring NSPredicateEditor(RowTemplate) for Spotlight metadata queriesI'

China☆狼群 提交于 2019-12-07 22:28:46
问题 I'm trying to configure an NSPredicateEditor (in Interface Builder) to edit the predicate for an NSMetadataQuery . As a first step, I'm trying to configure an NSPredicateEditorRowTemplate to accept key path(s) for the left-side expression, trying a single keyPath ( kMDItemTextContent ) to get started. I can't figure out how to get all the pieces into IB. I've selected the row template, and set "Left Exprs" to "Key Paths" in the IB Attributes Inspector. But, using Apple's PhotoSearch example

Automatically generated predicate row templates for to-many key?

这一生的挚爱 提交于 2019-12-07 15:55:36
问题 In my Core Data managed object model, I have an entity Foo with a to-many relationship (with a to-many inverse) to entity Baz named baz. Baz has a string property named "tag". When I use [NSPredicateRowEditorTemplate templatesWithAttributeKeyPaths:[NSArray arrayWithObject:@"baz.tag"] inEntityDescription:FooDescription] to create the row editors for an NSPredicateEditor, the result contains (as expected) a row template like [Popup: baz.tag] [Popup: Contains|is|is not|...] [TextField] When I

Configuring NSPredicateEditor(RowTemplate) for Spotlight metadata queriesI'

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 04:38:06
I'm trying to configure an NSPredicateEditor (in Interface Builder) to edit the predicate for an NSMetadataQuery . As a first step, I'm trying to configure an NSPredicateEditorRowTemplate to accept key path(s) for the left-side expression, trying a single keyPath ( kMDItemTextContent ) to get started. I can't figure out how to get all the pieces into IB. I've selected the row template, and set "Left Exprs" to "Key Paths" in the IB Attributes Inspector. But, using Apple's PhotoSearch example as a model, it appears that I should enter a user-readable attribute name (say, "Content") here; I can't

NSPredicateEditor row templates not configurable in interface builder

吃可爱长大的小学妹 提交于 2019-12-02 02:11:15
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'm not having any code jet. This is a bug in Xcode. I tried this with and without storyboards and had