Re: Swapping the NSTextContainer on an NSTextView
Re: Swapping the NSTextContainer on an NSTextView
- Subject: Re: Swapping the NSTextContainer on an NSTextView
- From: Douglas Davidson <email@hidden>
- Date: Tue, 3 Feb 2004 12:11:35 -0800
On Feb 3, 2004, at 11:15 AM, Robert Goldsmith wrote:
I remember there being a discussion about swapping out NSTextContainers
with an NSTextView to show multiple text contents - like projectBuilder
does - but can't find any agreed upon method in the archives. Before I
went hunting in the archives I trawled through Apple's info on the text
system and, following their info, am building my own text system
structure starting with an NSTextStorage, adding an NSLayoutManager and
an NSTextContainer. Then I have problems. When I either
setTextContainer or replaceTextContainer for the NSTextView or call
setTextView on the NSTextContainer to swap the view contents, all works
fine except for:
Offhand I don't recall any such example. Ordinarily there is a fairly
close binding between containers and their views--they appear in
one-to-one correspondence, they affect each other's sizing, and they
are not normally swapped after the initial setup. I would suggest
having each container hold on to its own text view, and swapping these
text views in and out of the window instead.
Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.