Replacing NSTextView with custom view?
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