• 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
Replacing NSTextView with custom view?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Replacing NSTextView with custom view?


  • Subject: Replacing NSTextView with custom view?
  • From: Peter Seibel <email@hidden>
  • Date: Sat, 13 Jan 2007 13:58:32 -0800

At least one of the text system architecture docs says something about how you might, in certain applications (they give a word processor as an example), want to not use NSTextView but instead create your own subclass of NSView. If you do do that, how many other classes in the text system do you need to replace? It seems like NSLayoutManager needs to be hooked up to an NSTextContainer which in turn needs to be hooked up to an actual NSTextView. Does that mean if I want to use my own NSView subclass to display text that I also need my own replacements for NSLayoutManager and NSTextContainer?

On a related note, what's the easiest way to wire my own subclass of NSTextStorage into a basic NSDocument based app (based on the write a text editor in 15 minutes tutorial)? Since the NSTextView that is instantiated in Interface Builder creates its NSTextStorage under the covers, I can't figure out the best way to intervene. Do I have to not create the NSTextView in IB and instead create it programatically and add it to the scroll view at runtime?


-Peter _______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Replacing NSTextView with custom view?
      • From: Peter Seibel <email@hidden>
    • Re: Replacing NSTextView with custom view?
      • From: 慧 松本 <email@hidden>
  • Prev by Date: Re: Annoying 'parse error before' messages
  • Next by Date: Re: NSTextField text changed
  • Previous by thread: Re: Problems with Webview in coredata framework app
  • Next by thread: Re: Replacing NSTextView with custom view?
  • Index(es):
    • Date
    • Thread