Re: NSPredicateEditorRowTemplate subviews layout

2025-05-17 Thread Steve Mills via Cocoa-dev
On May 16, 2025, at 09:36, Dragan Milić via Cocoa-dev wrote: > > Trying to resize any control in a row template by force (setFrame: or > setFrameSize:) has no effect. Have you tried adding a width constraint instead? Or subclass NSPopUpButton and override the intrinsicContentSize method? Or [

Re: NSPredicateEditorRowTemplate and dynamic templateViews

2010-03-30 Thread Dave DeLong
I'm still struggling with this. Does anyone know how I can either: 1. Use custom comparators in an NSPredicateEditorRowTemplate or 2. Have two templates with the same left expression and operator, but different right expression types? Thanks, Dave On Mar 12, 2010, at 7:29 PM, Dave DeLong wr

Re: NSPredicateEditorRowTemplate and dynamic templateViews

2010-03-12 Thread Dave DeLong
OK, continuing this thread on a related note: My date row templates allow me to do: "aDate is after aSpecificDate" and "aDate is in the last 30 days" Both of these are technically: "aDate > anotherDate" When I -init these custom row templates, I need to pass in an array of operators. I can't

Re: NSPredicateEditorRowTemplate and dynamic templateViews

2010-03-12 Thread Dave DeLong
This seems so obvious in retrospect that I can't believe I didn't think of that. Thank you so much! Dave On Mar 12, 2010, at 2:57 PM, Peter Ammon wrote: > What you want to do here is to create two separate templates. One "looks > like" this: > > [Creation Date, Modification Date]

Re: NSPredicateEditorRowTemplate and dynamic templateViews

2010-03-12 Thread Peter Ammon
On Mar 12, 2010, at 1:47 PM, Dave DeLong wrote: > Hi everyone, > > I'm trying to build a custom predicate editor row template that lets me do > predicates like "in the last 30 days" or "since {aDate}". For the simple > date comparison, I'm returning an NSDatePicker as the third view in my >

Re: NSPredicateEditorRowTemplate and dynamic popups

2009-11-13 Thread Jim Turner
Try this: Create an outlet to your row template. When you need to update the popups, make a copy of that template. Make a copy of the rowTemplates the predicate editor currently tracks and iterate over them replacing the template in the list that is the same class as your custom template. Then se

Re: NSPredicateEditorRowTemplate, NSPopupButton and bindings

2009-05-26 Thread Peter Ammon
Hi Martin, Yes, that's right. More generally, any changes to the popups after calling setRowTemplates: are likely to be futile. This is because the real popup buttons displayed in an NSPredicateEditor are not the same popup buttons returned from your NSPredicateEditorRowTemplate's - temp

Re: NSPredicateEditorRowTemplate, NSPopupButton and bindings

2009-05-25 Thread Martin Stanley
Peter, Thanks for your response (I was hoping you would notice my post :-). My interpretation of your response is as follows: 1- Cocoa bindings are not supported for popup views that are used in a NSPredicateRowtemplate, even if I am careful to make sure that the view is re-bound (via copyWi

Re: NSPredicateEditorRowTemplate, NSPopupButton and bindings

2009-05-22 Thread Peter Ammon
On May 22, 2009, at 9:37 AM, Martin Stanley wrote: I've finally got the hang of NSPredicateEditor and custom NSPredicateEditorRowTemplates. (It sure took a while and many, many searches and head-scratchings). However, I am stuck on one thing and I suspect that the problem might lie in the

Re: NSPredicateEditorRowTemplate and NSTokenField

2009-01-30 Thread Vitaly Ovchinnikov
I finally found a solution that seems to work. I subclassed NSTokenField: == @implementation MyTokenField - (void) notifyTarget: (id) sender { NSControl *t = [self target]; [t sendAction:nil to:t]; } - (void)textDidEndEditing:(NSNotification *)aNotification { [sup

Re: NSPredicateEditorRowTemplate for NSDate

2009-01-19 Thread Vitaly Ovchinnikov
Thanks to all for answers, now I need a few days to sleep with all these data. Thank you. On Tue, Jan 20, 2009 at 12:04 AM, Jim Turner wrote: > The miracle is over. The out-of-the-box templates in IB only provide > three-view templates (left expression, operator, right expression). > You'll need

Re: NSPredicateEditorRowTemplate for NSDate

2009-01-19 Thread Peter Ammon
Hello Vitaly, The Cocoa frameworks do not yet have any classes for specifying a relative date, so you will have to handle this yourself with a subclass of NSPredicateEditorRowTemplate. You can leverage the superclass to do much of the work for you: your responsibility is limited to turni

Re: NSPredicateEditorRowTemplate for NSDate

2009-01-19 Thread Markus Spoettl
On Jan 19, 2009, at 9:13 PM, Vitaly Ovchinnikov wrote: Hey, boys and girls? Am I the first, who use NSPredicateEditor? I just found that there is no default template for time values... I basically use this code for a date value row template (simplified version not tested): NSArray *ope

Re: NSPredicateEditorRowTemplate for NSDate

2009-01-19 Thread Jim Turner
The miracle is over. The out-of-the-box templates in IB only provide three-view templates (left expression, operator, right expression). You'll need to subclass NSPredicateEditorRowTemplate and provide the views and logic you want to use in your template. I did a presentation for the local CocoaH

Re: NSPredicateEditorRowTemplate for NSDate

2009-01-19 Thread Vitaly Ovchinnikov
Hey, boys and girls? Am I the first, who use NSPredicateEditor? I just found that there is no default template for time values... Please somebody confirm that miracle is over and I need to code all this data/time stuff myself :( On Sun, Jan 18, 2009 at 7:22 PM, Vitaly Ovchinnikov wrote: > Hello

Re: NSPredicateEditorRowTemplate and CoreData

2008-10-16 Thread Peter Ammon
On Oct 16, 2008, at 3:56 AM, Arved von Brasch wrote: Hello Cocoa Dev List, I'm loving NSPredicateEditor and what it lets you do. I'm wondering about the best way to manage what I want to do: I want a Pop-Up Pop-Up Pop-Up template row, where the last view is populated by every item of a

Re: NSPredicateEditorRowTemplate and ANY predicate

2008-07-23 Thread Peter Ammon
On Jul 23, 2008, at 1:58 AM, [EMAIL PROTECTED] wrote: De: [EMAIL PROTECTED] On Jul 22, 2008, at 12:05 PM, Frédéric Testuz wrote: Hello, Is it possible to prepare a row template for a NSPredicateEditor in IB for a predicate like "ANY keyPath == 'aValue'" ? I'm not sure I understand your

Re: NSPredicateEditorRowTemplate and ANY predicate

2008-07-23 Thread [EMAIL PROTECTED]
>De: [EMAIL PROTECTED] > >On Jul 22, 2008, at 12:05 PM, Frédéric Testuz wrote: > >> Hello, >> >> Is it possible to prepare a row template for a NSPredicateEditor in >> IB for a predicate like "ANY keyPath == 'aValue'" ? >> > >I'm not sure I understand your question. How is this different than

Re: NSPredicateEditorRowTemplate and ANY predicate

2008-07-22 Thread Peter Ammon
On Jul 22, 2008, at 12:05 PM, Frédéric Testuz wrote: Hello, Is it possible to prepare a row template for a NSPredicateEditor in IB for a predicate like "ANY keyPath == 'aValue'" ? I'm not sure I understand your question. How is this different than just a normal OR type compound predic

Re: NSPredicateEditorRowTemplate

2008-06-24 Thread Chris
Hi, No, I'm doing that all correctly. But now I seem to have changed something minor, but I'm not sure what, and now its working. Now its copying the object across correctly when I call objectValue. Anyway, thanks for the setObjectValue tip which was the key. I never would have guessed

Re: NSPredicateEditorRowTemplate

2008-06-24 Thread Jim Turner
On Tue, Jun 24, 2008 at 8:46 AM, Chris <[EMAIL PROTECTED]> wrote: > > Hi! > This is very interesting information. Wish it was in the doco! > I have a custom view which wasn't responding to setObjectValue / > objectValue. > When I add those methods I find that on startup it does indeed copy the > va

Re: NSPredicateEditorRowTemplate

2008-06-24 Thread Chris
Hi! This is very interesting information. Wish it was in the doco! I have a custom view which wasn't responding to setObjectValue / objectValue. When I add those methods I find that on startup it does indeed copy the values from object "C" to object "B". This means that when I retrieve

Re: NSPredicateEditorRowTemplate

2008-06-24 Thread Jim Turner
On Tue, Jun 24, 2008 at 2:02 AM, Chris <[EMAIL PROTECTED]> wrote: > When the user clicks ok, then I call objectValue on the NSPredicateEditor > and it calls predicateWithSubpredicates not on object "C", but on object > "B", which is always going to be blank, because it is in fact object "C" > which

Re: NSPredicateEditorRowTemplate: Custom templateView state

2008-06-04 Thread Mario Fischer
Hi Peter, yes of course, thanks! Am 04.06.2008 um 22:27 schrieb Peter Ammon: On Jun 3, 2008, at 12:05 PM, Mario Fischer wrote: Hi - - I use the NSPredicateEditor with a custom NSPredicateEditorRowTemplate - This custom component should implement something like this: [Filesize] -

Re: NSPredicateEditorRowTemplate: Custom templateView state

2008-06-04 Thread Peter Ammon
On Jun 3, 2008, at 12:05 PM, Mario Fischer wrote: Hi - - I use the NSPredicateEditor with a custom NSPredicateEditorRowTemplate - This custom component should implement something like this: [Filesize] - [is smaller/greater than] - [Textfield] - [KB/MB/GB] By overriding templateViews

Re: NSPredicateEditorRowTemplate and templateView delegates

2008-04-28 Thread Peter Ammon
On Apr 28, 2008, at 8:12 AM, Jim Turner wrote: I've a NSPredicateEditor with some basic popup-popup-view style templates (where the view is a NSTextField). I am attempting to set the text field's delegate to one of my objects so I can be notified when the control text changes. Everything appe