NSPredicateEditor query

2016-12-14 Thread Jonathan Mitchell
I have an NSPredicateEditor configured to generate my queries. I have two questions: 1. I want my users to be able to construct queries from a simple initial predicate. Ideally I would like the initial predicate to operate on a single key path and look something like: @"(self.ful

Bug with NSPredicateEditor in Xcode 4

2011-05-24 Thread Frédéric Testuz
In my project, I have a problem with editing NSPredicateEditor in a xib with Xcode 4. If I add a row template for strings, when I run my application and try to add a row to the predicate editor, I have an exception saying that it's impossible to init a predicate with a nil expression. If I

Re: Using NSPredicateEditor with core data

2010-08-14 Thread Gustavo Pizano
or NSAnyPredicateModifier). If you're using NSPredicateEditor to create the predicate, then the RowTemplate has to know to create a predicate with the right modifier. Unfortunately you cannot yet set that up in IB, but you can do it programmatically, by passing the right

Can't resize Floating-Number NSTextfield in NSPredicateEditor.

2010-08-13 Thread Gustavo Pizano
Hello all, I come to you asking for humble guidance. after reading the way to resize the TextFields in some other topic, I tried myself, without success.. This is what I have. A parent view which display the panel that contains the predicate editor, this predicate editor controller

Re: Can't resize Floating-Number NSTextfield in NSPredicateEditor.

2010-08-13 Thread Dave DeLong
This is only resizing the textfield of the row *template*, not the row itself. I've found that the easiest way to do what you're wanting is to subclass NSPredicateEditorRowTemplate and override the templateViews method. In that method you'll invoke super's implementation, then alter the frame

Re: Can't resize Floating-Number NSTextfield in NSPredicateEditor.

2010-08-13 Thread Gustavo Pizano
Dave thanks for the reply Im gonna try it right away. Gustavo. On Aug 13, 2010, at 3:39 PM, Dave DeLong wrote: This is only resizing the textfield of the row *template*, not the row itself. I've found that the easiest way to do what you're wanting is to subclass

Re: Can't resize Floating-Number NSTextfield in NSPredicateEditor.

2010-08-13 Thread Gustavo Pizano
Dave: Thanks worked like charm! . Gustavo On Aug 13, 2010, at 3:39 PM, Dave DeLong wrote: NSPredicateEditorRowTemplate ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

Using NSPredicateEditor with core data

2010-08-13 Thread Gustavo Pizano
Hello all once again. I have been searching but I hadn't found something useful, so please before if you know a place I can look at let me know. I have these 3 Entities ExpenditureGroup: name icon. --- toExpenditures. - Expenditure creationDate

Re: Using NSPredicateEditor with core data

2010-08-13 Thread Peter Ammon
NSPredicateEditor to create the predicate, then the RowTemplate has to know to create a predicate with the right modifier. Unfortunately you cannot yet set that up in IB, but you can do it programmatically, by passing the right NSComparisonPredicateModifier to one of the initWith... methods

Re: Using NSPredicateEditor with core data

2010-08-13 Thread Gustavo Pizano
NSAllPredicateModifier or NSAnyPredicateModifier). If you're using NSPredicateEditor to create the predicate, then the RowTemplate has to know to create a predicate with the right modifier. Unfortunately you cannot yet set that up in IB, but you can do it programmatically, by passing the right

Re: Using NSPredicateEditor with core data

2010-08-13 Thread Peter Ammon
to cross a to-many relation. Is that right? If so, you need to create a predicate that has an NSComparisonPredicateModifier that knows how to cross to-many relations (that is, either NSAllPredicateModifier or NSAnyPredicateModifier). If you're using NSPredicateEditor to create the predicate

NSPredicateEditor, _NSRuleEditorViewUnboundRowHolder and boundArray error moving to 10.6

2010-04-08 Thread Barry Wark
I have an application originally written for the 10.5 SDK. The app presents a document modal sheet (owned by a separate NSWindowController subclass) which contains an NSPredicateEditor. Starting with the move to OS X 10.6, I am getting the following exception when calling setObjectValue

Dragging rows in NSPredicateEditor

2010-03-12 Thread Graham Cox
I'm using the NSPredicateEditor control for the first time, and so far it's going well. I notice though that at runtime I'm able to drag an image of each row. What can I do with this drag? I either need to be able to process it in some meaningful way (there may be none for my app) or turn

Re: Dragging rows in NSPredicateEditor

2010-03-12 Thread Graham Cox
On 13/03/2010, at 2:03 PM, Graham Cox wrote: I notice though that at runtime I'm able to drag an image of each row. What can I do with this drag? I just realised that the drag allows me to reorder the rows - is that its only purpose? I didn't realise that before because it is still

Re: NSPredicateEditor losing nextKeyView

2010-02-23 Thread Trygve Inda
On Feb 21, 2010, at 9:50 PM, Trygve Inda wrote: In my sheet, I have a name NSTextField and an NSPredicateEditor. Initially, the tab key works to jump between my name field and the first match field in the predicate editor. However, after changing any of the menus in the line of my

Re: NSPredicateEditor losing nextKeyView

2010-02-23 Thread Ashley Clark
On Feb 23, 2010, at 2:31 PM, Trygve Inda wrote: On Feb 21, 2010, at 9:50 PM, Trygve Inda wrote: In my sheet, I have a name NSTextField and an NSPredicateEditor. Initially, the tab key works to jump between my name field and the first match field in the predicate editor. However, after

NSPredicateEditor losing nextKeyView

2010-02-21 Thread Trygve Inda
In my sheet, I have a name NSTextField and an NSPredicateEditor. Initially, the tab key works to jump between my name field and the first match field in the predicate editor. However, after changing any of the menus in the line of my predicate editor, the tab key no longer allows the keyfield

Re: NSPredicateEditor losing nextKeyView

2010-02-21 Thread Ashley Clark
On Feb 21, 2010, at 9:50 PM, Trygve Inda wrote: In my sheet, I have a name NSTextField and an NSPredicateEditor. Initially, the tab key works to jump between my name field and the first match field in the predicate editor. However, after changing any of the menus in the line of my predicate

NSPredicateEditor Continuous updating failes

2010-01-21 Thread Florian Soenens
Hi LIst, i set up an NSPredicateEditor and got it all working fine except that it only executes when i hit enter or tab out of the NSTextField. Is there a way to let it execute everytime something changes in the textfield? I tried checking the continuous button in IB but that is impossible

Re: NSPredicateEditor Continuous updating failes

2010-01-21 Thread Jim Turner
On Thu, Jan 21, 2010 at 6:00 AM, Florian Soenens florian.soen...@nss.be wrote: Hi LIst, i set up an NSPredicateEditor and got it all working fine except that it only executes when i hit enter or tab out of the NSTextField. Is there a way to let it execute everytime something changes

Re: Having problems understanding NSPredicateEditor

2009-12-27 Thread Timothy Stafford Larkin
The only way I have done this is to build the thing in IB. Forget the NSSearchField. First add a Predicate Editor to a window. This gives you a top-level compound predicate (Any of the following are true) and a single predicate template. The predicate template has three parts, a left

Having problems understanding NSPredicateEditor

2009-12-26 Thread Mike Chambers
I have an application that contains a NSTableView of Card data types. The NSTableView gets its data from an NSArray of Card instances. I want to allow the user to be able to filter the view based on the Card fields. I know I need to use a NSPredicateEditor to present the UI for the user

Help Debugging NSPredicateEditor reloadCriteria Exception

2009-12-15 Thread Marshall Houskeeper
Under 10.6.2 my program is throwing an exception when I call the NSPredicateEditor method reloadCriteria. I do not see the behavior on earlier releases of 10.6 or 10.5. When the exception is thrown the stack is the following: #0 0x96f624e6 in objc_exception_throw () #1 0x95657138

Re: Possible NSPredicateEditor bug (found workaround)

2009-07-05 Thread Tom
On 03/07/2009, at 12:26 PM, Tom wrote: 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

Possible NSPredicateEditor bug

2009-07-02 Thread Tom
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

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-29 Thread Jerry Krinock
menu! [1] But the other issue -- the inability of a Core Data fetch to handle arbitrary predicates produced by NSPredicateEditor -- weighs heavily against Core Data fetches. I made my own simple predicate editor control a few years ago, but of course it is a pile of garbage compared

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-28 Thread Jerry Krinock
On 2009 Apr 23, at 13:53, Melissa J. Turner wrote: Unwinding to the original message, the most correct thing to do would be to add a derived property letterGrade which is automatically updated whenever grade is, which then allows you to search against that. I don't know if a derived

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-28 Thread Kyle Sluder
On Tue, Apr 28, 2009 at 5:15 PM, Jerry Krinock je...@ieee.org wrote: If Melissa is referring to a managed property, if it is non-transient, then yes this could be used in the predicate of a Core Data fetch.  The disadvantage is that now every object in every store has this redundant (derived)

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-28 Thread Melissa J. Turner
(apologies for the delay; I've been on vacation for the last few days and just got back) On Apr 28, 2009, at 14:32, Kyle Sluder wrote: So step 1 is to stop clinging to normalization rules. (My database professor would kill me for that sentence, but it's true.) There really is no redundancy

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-27 Thread Jerry Krinock
in which you need to perform nested to-many operations, yet you cannot use SUBQUERY or compound queries like OR ? Or is this troubling, in the sense that the universe is doomed to evaporate kind of way ? Well, I'd rather give my users NSPredicateEditor and let them make that decision. I'm

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-24 Thread Jerry Krinock
On 2009 Apr 23, at 13:53, Melissa J. Turner wrote: Unwinding to the original message, the most correct thing to do would be to add a derived property letterGrade which is automatically updated whenever grade is, which then allows you to search against that. Melissa, please give a more

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-23 Thread Mike Abdullah
On 22 Apr 2009, at 22:34, Melissa J. Turner wrote: On Apr 22, 2009, at 02:12, Mike Abdullah wrote: On 22 Apr 2009, at 08:48, Ben Trumbull wrote: Of course, why Apple couldn't have then added automatic support for in-memory matching as the second step I don't know Probably because

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-23 Thread Jerry Krinock
On 2009 Apr 23, at 05:18, Mike Abdullah wrote: OK, so I'm trying to wrap my head around this. Let's say I build a predicate along the lines of: fooPersistent == 123 fooTransient == 456 And then use it in a fetch request. Does Core Data: A) Pass that predicate straight to SQLite which

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-23 Thread Mike Abdullah
On 23 Apr 2009, at 15:03, Jerry Krinock wrote: On 2009 Apr 23, at 05:18, Mike Abdullah wrote: OK, so I'm trying to wrap my head around this. Let's say I build a predicate along the lines of: fooPersistent == 123 fooTransient == 456 And then use it in a fetch request. Does Core Data:

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-22 Thread Ben Trumbull
Of course, why Apple couldn't have then added automatic support for in-memory matching as the second step I don't know Probably because nobody ever cared enough to file an enhancement request, and it didn't occur to us that writing 1 line of code to call filteredArrayWithPredicate was so

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-22 Thread Ben Trumbull
The fact that Core Data cannot fetch using a predicate based on transient properties [1] seems to greatly limit the utility of the NSPredicateEditor view, and makes me very sad. Dear list. transient (adj): (1) passing especially quickly into and out of existence May I suggest

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-22 Thread Mike Abdullah
On 22 Apr 2009, at 08:48, Ben Trumbull wrote: Of course, why Apple couldn't have then added automatic support for in-memory matching as the second step I don't know Probably because nobody ever cared enough to file an enhancement request, and it didn't occur to us that writing 1 line of

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-22 Thread Melissa J. Turner
On Apr 22, 2009, at 02:12, Mike Abdullah wrote: On 22 Apr 2009, at 08:48, Ben Trumbull wrote: Of course, why Apple couldn't have then added automatic support for in-memory matching as the second step I don't know Probably because nobody ever cared enough to file an enhancement request,

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-20 Thread Jerry Krinock
:) I also tried Keary's suggestion, and learned some stuff that may be useful to have in the list archives... On 2009 Apr 17, at 09:27, Keary Suska wrote: I am not really up to speed on NSPredicateEditor, but could you use - ruleEditor:predicatePartsForCriterion:withDisplayValue:inRow

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-20 Thread Jerry Krinock
guess the reason why Apple has never noticed that Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness is because there's a better way to do it. Makes me wonder why NSFetchRequest even supports a predicate, since its predicate has all these limitations and is supposedly more

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-20 Thread Melissa Turner
On Mon, April 20, 2009 11:02 am, Jerry Krinock wrote: Makes me wonder why NSFetchRequest even supports a predicate, since its predicate has all these limitations and is supposedly more expensive when compared to fetching all objects and then using - [NSArray filteredArrayWithPredicate:] ? It

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-20 Thread Jim Correia
On Apr 20, 2009, at 2:02 PM, Jerry Krinock wrote: A much better way appears to be to fetch all objects from the store with no predicate and then use -[NSArray filteredArrayWithPredicate:]. This takes only one more line of code, solves all problems, and is supposedly cheaper too: If you

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-20 Thread Sean McBride
On 4/20/09 11:02 AM, Jerry Krinock said: But there's an even better way. Upon further study of the Predicate Programming Guide, I find that there are even more limitations to Core Data fetches with predicates. The most troubling is that: The Core Data SQL store supports only one to-many

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-20 Thread Jerry Krinock
On 2009 Apr 20, at 11:24, Jim Correia wrote: On Apr 20, 2009, at 2:02 PM, Jerry Krinock wrote: Makes me wonder why NSFetchRequest even supports a predicate, since its predicate has all these limitations and is supposedly more expensive when compared to fetching all objects and then using

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-19 Thread Mike Abdullah
of the NSPredicateEditor view, and makes me very sad. For example, say that my objects are student test results with a 'score' attribute and two dozen other properties. I could give the user an NSPredicateEditor and let them have oodles of fun constructing complex predicates. But what if I need the user

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-17 Thread Keary Suska
On Apr 16, 2009, at 9:01 PM, Jerry Krinock wrote: The fact that Core Data cannot fetch using a predicate based on transient properties [1] seems to greatly limit the utility of the NSPredicateEditor view, and makes me very sad. For example, say that my objects are student test results

Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-16 Thread Jerry Krinock
The fact that Core Data cannot fetch using a predicate based on transient properties [1] seems to greatly limit the utility of the NSPredicateEditor view, and makes me very sad. For example, say that my objects are student test results with a 'score' attribute and two dozen other

Re: A question about NSPredicateEditor and NSPredicateEditorRowTemplate

2009-03-06 Thread David Hoerl
[following up to a Jan 08 thread] is it possible to modify the width of the NSTextField representing a Number in a NSPredicateEditorRowTemplate ? Yes, but not yet in Interface Builder. To do so programatically, get the row template, get the text field as the last member of the row

Re: A question about NSPredicateEditor and NSPredicateEditorRowTemplate

2009-03-06 Thread Peter Ammon
by NSPredicateEditor). But changing the width should have an effect. -Peter ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins

one more NSPredicateEditor question

2009-01-28 Thread Vitaly Ovchinnikov
Hello once again, just a quick question: It seems that predicate editor remains what right view was used for each operation. If I add a row with numeric parameter and two operators (less and greater) and then switch between them - predicate editor will remember value I entered for less and when I

Adding rows in NSPredicateEditor

2009-01-26 Thread Tom
Hi everyone, I'm wondering if there is a way I can control which row template gets added when the user clicks the '+' button on an NSPredicateEditor. The template chosen seems to be random, but I want it to be a specific one for user convenience. Kind regards, Tom

Re: Adding rows in NSPredicateEditor

2009-01-26 Thread Peter Ammon
On Jan 25, 2009, at 3:25 AM, Tom wrote: Hi everyone, I'm wondering if there is a way I can control which row template gets added when the user clicks the '+' button on an NSPredicateEditor. The template chosen seems to be random, but I want it to be a specific one for user convenience

NSPredicateEditor

2009-01-15 Thread Chris Idou
Is it just me or does the enabled checkbox in IB for NSPredicateEditor, as well as the enabled bindings do nothing? Stay connected to the people that matter most with a smarter inbox. Take a look http://au.docs.yahoo.com/mail/smarterinbox

Re: NSPredicateEditor

2009-01-15 Thread Volker in Lists
for NSPredicateEditor, as well as the enabled bindings do nothing? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help

Re: NSPredicateEditor

2009-01-15 Thread Chris Idou
on the predicateEditor, and it didn't do anything. I am using 10.5.6. From: Volker in Lists volker_li...@ecoobs.de To: Chris Idou idou...@yahoo.com Cc: cocoa-dev@lists.apple.com Sent: Friday, 16 January, 2009 12:42:10 AM Subject: Re: NSPredicateEditor Hi, works for me on 10.5.5

Re: NSPredicateEditor

2009-01-15 Thread Peter Ammon
On Jan 15, 2009, at 5:14 AM, Chris Idou wrote: Is it just me or does the enabled checkbox in IB for NSPredicateEditor, as well as the enabled bindings do nothing? enabled indeed does nothing yet. If you want to prevent the user from changing an NSPredicateEditor, you can use

NSPredicateEditor

2009-01-05 Thread Eckart Schlottmann
Hello, I'm working on a small CoreData Document based application and wanted to include an NSPredicateEditor in a NSDrawer. But this failed for me because somehow the NSPredicateEditor is not drawn in the Drawer's Content View. From the PredicateEditorSample I found out

NSPredicateEditor and aggregate operations

2008-12-16 Thread Tom
Hi everyone, I'm trying to implement a find window using an NSPredicateEditor, but can't get it to do aggregate operations like ANY tags == 'some tag' . As far as I can see, Interface Builder doesn't cater for aggregate operations like ANY. I assume I have to subclass

Re: NSPredicateEditor and aggregate operations

2008-12-16 Thread Tom
I've got around it by implementing a kind of man in the middle subclass of NSPredicateEditorRowTemplate. I set the class of the row template to my subclass in IB and it automatically adds the ANY modifier to whatever is already configured. It removes the ANY modifier from the predicate

NSPredicateEditor and date comparisons

2008-12-07 Thread Josh Abernathy
Hi all, In my application, users have the option of comparing to a date in an NSPredicateEditor. For the NSDates it is comparing against, only the date is important; time doesn't matter. The interesting thing I found about NSPredicateEditor is the NSTimeInterval it compares my NSDates

Re: NSPredicateEditor and date comparisons

2008-12-07 Thread Chris Idou
I'm a bit confused by your post. NSPredicateEditor doesn't compare any dates, it just creates NSPredicates. Maybe you're saying that if you have a NSDatePicker in your NSPredicateEditor, that it creates a predicate with a date set to 13:41:40. If that's the case, then it probably has more

Re: NSPredicateEditor and date comparisons

2008-12-07 Thread Josh Abernathy
Ah, yes, that would be the more accurate way to explain it. I have an NSDatePicker in my NSPredicateEditor and no funny business is going on with conversions. It's just the simple default, setup-in-IB usage. So I guess the question is better put: is there any guarantee about the time

Re: NSPredicateEditor and date comparisons

2008-12-07 Thread Chris Idou
the program? --- On Sun, 7/12/08, Josh Abernathy [EMAIL PROTECTED] wrote: From: Josh Abernathy [EMAIL PROTECTED] Subject: Re: NSPredicateEditor and date comparisons To: [EMAIL PROTECTED] Cc: Cocoa-Dev List cocoa-dev@lists.apple.com Received: Sunday, 7 December, 2008, 5:00 PM Ah, yes

Re: NSPredicateEditor and date comparisons

2008-12-07 Thread jmunson
PROTECTED] Subject: Re: NSPredicateEditor and date comparisons To: [EMAIL PROTECTED] Cc: Cocoa-Dev List cocoa-dev@lists.apple.com Received: Sunday, 7 December, 2008, 5:00 PM Ah, yes, that would be the more accurate way to explain it. I have an NSDatePicker in my NSPredicateEditor and no funny business

Re: NSPredicateEditor and date comparisons

2008-12-07 Thread Chris Idou
I think you're better off writing a custom Date compare function, and customising the NSPredicateEditor to return a predicate using the function, so that you can guarantee that date comparison happens the way you want. I guess you *could* control the date passed into the predicate to normalise

NSPredicateEditor and date comparisons

2008-12-06 Thread Josh Abernathy
Hi all, In my application, users have the option of comparing to a date in an NSPredicateEditor. For the NSDates it is comparing against, only the date is important; time doesn't matter. The interesting thing I found about NSPredicateEditor is the NSTimeInterval it compares my NSDates

Re: NSPredicateEditor

2008-11-03 Thread Peter Ammon
available in a popup, you should create a new NSPredicateEdtorRowTemplate whose popups contain the items you want, and then add it to the NSPredicateEditor with setRowTemplates:. -Peter ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: NSPredicateEditor not updating scrollbar

2008-11-03 Thread Graham Cox
On 4 Nov 2008, at 3:38 pm, Guy Umbright wrote: I have an NSPredicateEditor in an NSTabView. But when I add enough predicate items to the point where the vertical scrollbar should appear, it does not. My question is am I wrong to expect it to handle the scrollbar or am I missing

NSPredicateEditor

2008-11-02 Thread Chris Idou
Has anyone been able to add menu items to the first popup while it is running? Or are you pretty much stuck with whatever the initial values were? I've tried various things and haven't been able to do it. ___ Cocoa-dev mailing list

NSRuleEditor/NSPredicateEditor selected rows

2008-10-31 Thread Houdah - ML Pierre Bernard
Hi! NSRuleEditor has the concept of selected rows in its API. I however see no visual clues of which rows are selected. Is it possible to subclass whatever cell view is used by the rule editor to add such a visual clue? Pierre ___ Cocoa-dev

Re: NSRuleEditor/NSPredicateEditor selected rows

2008-10-31 Thread Peter Ammon
On Oct 31, 2008, at 12:17 AM, Houdah - ML Pierre Bernard wrote: Hi! NSRuleEditor has the concept of selected rows in its API. I however see no visual clues of which rows are selected. Is it possible to subclass whatever cell view is used by the rule editor to add such a visual clue?

Re: NSPredicateEditor error

2008-10-28 Thread Peter Ammon
On Oct 27, 2008, at 10:07 PM, Chris Idou wrote: I'm getting the following error: In NSPredicateEditor: 0x1096070, different number of items (3) than predicate template views (4) for template MyRowTemplate 0x12487e0: [move:] [] NSStringAttributeType From experimenting, the only

Getting localized NSPredicateEditor

2008-10-28 Thread Markus Spoettl
Hello List, is there a way to make NSPredicateEditor play nice with localized versions of an application, meaning that it's rule operators and criteria are translated to the language the rest of the application is using? Right now it appears that NSPredicateEditor uses English operator

Re: Getting localized NSPredicateEditor

2008-10-28 Thread Peter Ammon
On Oct 28, 2008, at 1:12 PM, Markus Spoettl wrote: Hello List, is there a way to make NSPredicateEditor play nice with localized versions of an application, meaning that it's rule operators and criteria are translated to the language the rest of the application is using? Right now

Re: NSPredicateEditor error

2008-10-28 Thread Chris Idou
Yes, I thought I had an NSButton, but it turned out I'd wrongly put in a NSPopupButton. --- On Tue, 10/28/08, Peter Ammon [EMAIL PROTECTED] wrote: From: Peter Ammon [EMAIL PROTECTED] Subject: Re: NSPredicateEditor error To: [EMAIL PROTECTED] Cc: cocoa-dev@lists.apple.com Date: Tuesday

Re: Getting localized NSPredicateEditor

2008-10-28 Thread Markus Spoettl
Hi Peter, On Oct 28, 2008, at 2:10 PM, Peter Ammon wrote: Apple does not provide any translations of the operator names or criteria. This is because NSPredicateEditor is designed to be localized with sentence granularity, not word by word. Translating each word independently and piecing

Re: Getting localized NSPredicateEditor

2008-10-28 Thread Markus Spoettl
Hi Peter, On Oct 28, 2008, at 3:33 PM, Markus Spoettl wrote: 10/28/08 3:20:54 PM myApp[43721] Error parsing localization! Key: %d %@ Value: %1$d %2$@ Error is: The maximum given order was 2, but nothing has order 1. The localization part looks like this: Never mind the

Re: Getting localized NSPredicateEditor

2008-10-28 Thread Peter Ammon
parsing localization! Key: %d %@ Value: %1$d %2$@ Error is: The maximum given order was 2, but nothing has order 1. My guess is that you're using the same strings file for this and other uses. The %[...]@ syntax is unique to NSRuleEditor/NSPredicateEditor and so it needs its

Re: Getting localized NSPredicateEditor

2008-10-28 Thread Markus Spoettl
On Oct 28, 2008, at 3:57 PM, Peter Ammon wrote: Here's something that may help - there's a method on NSRuleEditor: - (NSData *)_generateFormattingDictionaryStringsFile. It gives you a strings file (as UTF16 data) appropriate for that control - write the data to a .strings file and then you

Re: NSPredicateEditor - row size

2008-10-27 Thread Peter Ammon
On Oct 25, 2008, at 4:07 AM, Chris Idou wrote: Has anyone found a way to make a row in the NSPredicateEditor to have components taller than the standard height or a more complicated arrangement of components, or are you pretty much limited to one row of buttons, and text fields

Re: NSPredicateEditor - row size

2008-10-27 Thread Peter Ammon
On Oct 27, 2008, at 11:28 AM, Peter Ammon wrote: On Oct 25, 2008, at 4:07 AM, Chris Idou wrote: Has anyone found a way to make a row in the NSPredicateEditor to have components taller than the standard height or a more complicated arrangement of components, or are you pretty much

NSPredicateEditor error

2008-10-27 Thread Chris Idou
I'm getting the following error: In NSPredicateEditor: 0x1096070, different number of items (3) than predicate template views (4) for template MyRowTemplate 0x12487e0: [move:] [] NSStringAttributeType From experimenting, the only difference between the NSPredicateEditorRowTemplate

NSPredicateEditor - row size

2008-10-25 Thread Chris Idou
Has anyone found a way to make a row in the NSPredicateEditor to have components taller than the standard height or a more complicated arrangement of components, or are you pretty much limited to one row of buttons, and text fields and similar sized components? Programs like Hazel are able

Re: NsPredicateEditor

2008-09-21 Thread Chris Idou
. --- On Thu, 9/18/08, Sandro Noel [EMAIL PROTECTED] wrote: From: Sandro Noel [EMAIL PROTECTED] Subject: NsPredicateEditor To: cocoa-dev Users cocoa-dev@lists.apple.com Date: Thursday, September 18, 2008, 10:12 PM Greetings. I would like to use NSPredicateEditor to build a filtering string

Re: NsPredicateEditor

2008-09-21 Thread Sandro Noel
can at least see the add button. You can also search the archives for some tips. --- On Thu, 9/18/08, Sandro Noel [EMAIL PROTECTED] wrote: From: Sandro Noel [EMAIL PROTECTED] Subject: NsPredicateEditor To: cocoa-dev Users cocoa-dev@lists.apple.com Date: Thursday, September 18, 2008, 10:12 PM

Re: NsPredicateEditor

2008-09-21 Thread Barry Wark
] Subject: NsPredicateEditor To: cocoa-dev Users cocoa-dev@lists.apple.com Date: Thursday, September 18, 2008, 10:12 PM Greetings. I would like to use NSPredicateEditor to build a filtering string to filter out items from an array. but i cant seem to find a tutorial on the matter, and the cocoa

NsPredicateEditor

2008-09-18 Thread Sandro Noel
Greetings. I would like to use NSPredicateEditor to build a filtering string to filter out items from an array. but i cant seem to find a tutorial on the matter, and the cocoa documentation gets me lost, there is not enough information in there for me to really grasp what i should do to make

Re: NSPredicateEditor

2008-07-03 Thread Peter Ammon
On Jun 26, 2008, at 6:48 PM, Chris wrote: On Fri, Jun 27, 2008 at 10:09 AM, Peter Ammon [EMAIL PROTECTED] wrote: On Jun 25, 2008, at 7:27 PM, Chris wrote: The net effect is that NSPredicateEditor can't display a predicate like NOT (foo = bar) A bug in NSPredicateEditor system

Re: NSPredicateEditor

2008-06-26 Thread Kyle Sluder
On Wed, Jun 25, 2008 at 4:12 PM, Peter Ammon [EMAIL PROTECTED] wrote: If the holds down the option key and clicks a + button, it will insert another compound row, so the user can make arbitrarily complex predicates. Well this is incredibly undiscoverable UI. Bug report time! --Kyle Sluder

Re: NSPredicateEditor

2008-06-26 Thread Peter Ammon
On Jun 25, 2008, at 7:27 PM, Chris wrote: The net effect is that NSPredicateEditor can't display a predicate like NOT (foo = bar) A bug in NSPredicateEditor system perhaps? But surely someone would have seen it before. Hi Chris, NOT type compound predicates only support exactly one

Re: NSPredicateEditor

2008-06-26 Thread Chris
On Fri, Jun 27, 2008 at 10:09 AM, Peter Ammon [EMAIL PROTECTED] wrote: On Jun 25, 2008, at 7:27 PM, Chris wrote: The net effect is that NSPredicateEditor can't display a predicate like NOT (foo = bar) A bug in NSPredicateEditor system perhaps? But surely someone would have seen

NSPredicateEditor

2008-06-25 Thread Chris
Let's say I create a NSPredicateEditor and it looks like this: [All] of the following are true: [Name] equals [ ] --- So the user enters say Fred and the predicate returned is Name == Fred. Later on, I reload that predicate

Re: NSPredicateEditor

2008-06-25 Thread Jim Turner
On Wed, Jun 25, 2008 at 1:08 AM, Chris [EMAIL PROTECTED] wrote: Let's say I create a NSPredicateEditor and it looks like this: [All] of the following are true: [Name] equals [ ] --- So the user enters say Fred

Re: NSPredicateEditor

2008-06-25 Thread Chris
AND or OR, but not both from the user, even though the machinery seems to know how to display things more complex. On 25/06/2008, at 11:57 PM, Jim Turner wrote: On Wed, Jun 25, 2008 at 1:08 AM, Chris [EMAIL PROTECTED] wrote: Let's say I create a NSPredicateEditor and it looks like

Re: NSPredicateEditor

2008-06-25 Thread Peter Ammon
Hi Chris, If the holds down the option key and clicks a + button, it will insert another compound row, so the user can make arbitrarily complex predicates. If this doesn't seem to happen, make sure the nesting mode is set to compound. By default, NSPredicateEditor supports

NSPredicateEditor and decimal numbers with fractions

2008-06-19 Thread Ruotger Skupin
Hi, I've set up a NSPredicateEditor with a template that forms for example a predicate like: [Gross Value] [is] [ ] the format of the text field is set as Number in Interface Builder. If I input 32.99 into the field I get a predicate like this: grossAmount.amount == 32 Obviously

NSPredicateEditor and decimal numbers with fractions

2008-06-19 Thread Ruotger Skupin
Hi, I've set up an NSPredicateEditor with a template that forms a predicate like: [Gross Value] [is] [32.99] the format of the text field is set as Number in Interface Builder. If I input 32.99 into the field I get a predicate like this: grossAmount.amount == 32 Obviously the number