• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
CoreData and NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: CoreData and NSTextView
      • From: "John C. Randolph" <email@hidden>
    • Re: CoreData and NSTextView
      • From: John Timmer <email@hidden>
  • Prev by Date: Re: Can an object's relationship point to itself?
  • Next by Date: Re: New Document With A Default Name and Default Path
  • Previous by thread: Re: Can an object's relationship point to itself?
  • Next by thread: Re: CoreData and NSTextView
  • Index(es):
    • Date
    • Thread