CoreData and NSTextView
CoreData and NSTextView
- Subject: CoreData and NSTextView
- From: T Reaves <email@hidden>
- Date: Fri, 20 May 2005 22:04:32 -0400
Hello all.
Has anyone had time to play around and figure out what is the
best way to handle NSTextView and the attribute it is bound to in a
CoreData object? It seems that there are two main options: as a
string, and as binary. Neither really seems like a good choice.
If I use string, I must de-select the option in IB to allow
multiple fonts. This isn't such a big deal. What is a big deal is
that users of my app can not paste in text from other apps. When
they do, an exception is thrown that the type is an NSString, but the
text pasted in is an instance of NSAttributedString. So you can not
leave the NSTextView until you undo the paste.
If I set it up as a binary type, and allow multiple fonts, the
text that is pasted in an instance of NSConcreteData-something-or-
other. So no exception is thrown, but now the text is stored as a
binary string. My concern with this is how it may effect searches,
etc. Will a search on a binary filed work?
Ideally, I'd like the NSTextView to handle rich text. So what
is the best way of accomplishing this? Thanks.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden