Re: Searching NSTextView Field
Re: Searching NSTextView Field
- Subject: Re: Searching NSTextView Field
- From: Fritz Anderson <email@hidden>
- Date: Tue, 23 Apr 2013 09:12:15 -0500
In the future, I hope you will post replies to the mailing list, where others may be able to get to your question before I can. I'm bringing this back to the list thread.
On 22 Apr 2013, at 6:08 PM, Kiefer <email@hidden> wrote:
> I apologize for not answering sooner things have been a bit hectic. Here is the screen capture I was speaking of. As you can see I am able to format my predicates in the Search area to search the core data Entity. The format denoted below does not search through the field it is attached to for a NSTextView.
>
> <image.png>
>
> The way I attached the NSTextView to the field was I drug it onto the form and connect it through the bindings inspector as noted below:
>
> <image.png>
[The images show that Interface Builder offers a search-predicate binding for an NSSearchField (where the predicate-format parameter appears), but not for an NSTextView.]
My experiment shows the same.
The binding is not documented to be available for any class other than NSSearchField, not even the immediate superclass NSTextField. Bindings are often specific to view classes. The chapters in the "Cocoa Bindings Reference" article list what each class makes available. "predicate" is shown for NSSearchField, but not for NSTextField.
NSTextView isn't closely related to NSSearchField. The common ancestor, NSView, is three superclasses up from NSSearchField, and two up from NSTextView. Even if bindings were inheritable (they may be, but that's an implementation detail), you would not expect NSView to have a "predicate" binding.
If we were talking about two immediate descendants of NSTextField, I'd recommend trying to establish the binding programmatically. I wouldn't expect it to work, and I wouldn't expect it to work in future versions of the operating system (even in a 10.8.x revision), but you might see something.
For NSTextView, there's no hope.
— F
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden