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 ...
How can I modify the NSDatePickerElementFlags for the NSDatePicker in row templates for NSDate properties returned by [NSPredicateRowEditorTemplate templatesWithAttributeKeyPaths:inEntityDescription:]? I would like the NSDatePicker to show hrs:minutes as well as the date.
Update
I've added an answer below, gleaned from the cocoa-dev lis...
Hi,
I'm currently designing a predicate editor and want to use for some fields different right hand types. Unfortunately you can only select one type like numbers, dates, constants, etc. What I want is dates AND constants. I have tried to use a second row template but this is not allowed for the rules editor.
Any ideas?
Thanks.
...
I can create an NSPredicate easily using an NSPredicateEditor (a subclass of NSRuleEditor). What I'd like to know is this:
How can I take an existing NSPredicate (one created by the editor) and reload it into the editor so that I can alter it?
EDIT: I tried @John's suggestion of using setObjectValue:, but that didn't quite work. Let ...
I'll say right off I am an inexperienced Cocoa programmer, and I apologize if my question is answered in the docs somehow and I merely missed it, or there was something I don't understand in how the NSPredicateEditor works. However, I did attempt to search in the docs and googled, to little effect. Thus, I bring the question to you.
I a...
I am trying to generate predicate editor templates for my Core Data entities. In my code I have the following:
NSEntityDescription *descrip = [NSEntityDescription entityForName:@"Person" inManagedObjectContext:managedObjectContext];
NSArray *templates = [NSPredicateEditorRowTemplate templatesWithAttributeKeyPaths:[NSArray arrayWithO...
I've seen some apps are using alternating rows background in their predicate editors, but I can't figure out how they do it.
...
I'm building an NSPredicateEditor, and I want the ability to do advanced date comparison.
I realize that I can build an NSPredicateEditorRowTemplate with a rightExpressionType of NSDateAttributeType, but the predicates I want to build need to be much more advanced than that.
For example, I need to basic comparison like:
dateKeypath <...
Hello,
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]...
I'm having a really weird problem. I'm trying to put an NSPredicateEditor into my interface using IB, and when I build the app it just shows up as an empty gray rectangle. This is without my applying ANY CHANGES WHATSOEVER to the defaults, including not modifying the default templates. What could possibly be going on?
...