Re: Searching NSTextView Field
Re: Searching NSTextView Field
- Subject: Re: Searching NSTextView Field
- From: Fritz Anderson <email@hidden>
- Date: Mon, 22 Apr 2013 13:12:29 -0500
On 20 Apr 2013, at 7:46 AM, "K. Thomas Emmert" <email@hidden> wrote:
> I have posted this question on a couple of other boards and I guess I did not explain myself properly. So I am going to give a post here to see if someone can give me some insight.
>
> I have a project with a NSTextView connected to a field in a core data base. My other text fields are searchable using the search definitions in IB. See my screen shot. Here: http://www.fileswap.com/dl/5P8ISfZl3...23_AM.png.html using the format of: (field contains[c] $value). This works fine for the regular text fields but when I use the same search format for my NSTextView the program throws an error of: Can't use in/contains operator with collection (not a collection).
We'd understand your question better if I could see the page you refer to. The server says there is no such page. It appears your email client truncated the URL in the middle.
> My question is: Is it possible to use the predicate search on a NSTextView from IB? If it is how is it done? I have not been able to find any information on this at all from searching the web.
I don't understand what you mean by a "predicate search on an NSTextView." You search data objects in collections, either through a Core Data NSFetchRequest or a filtering method on the Foundation collection classes. Text views are neither collections, nor managed object contexts, nor members of collections.
How do you "connect" your text view to a field (attribute) in a Core Data entity? Text views display NSTextStorage objects, which are ultimately NSAttributedStrings, which aren't directly representable in Core Data attributes. You have to transform them into NSData blobs (and deal with the fact that there will be a fresh blob at every change, and therefore [if you handle this naïvely] the text view will lose state when it sees what amounts to a complete replacement of its contents at every keystroke).
> I am using Xcode 4.6.1 for Mac on OS X 10.8.3...
The current Xcode is 4.6.2. The chances of that solving your problem are marginal, but it's good hygiene.
— 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