Re: Properly wrapping non-contiguous NSTextViews

2011-08-17 Thread Ross Carter
On Aug 16, 2011, at 3:40 PM, Nick Zitzmann wrote: Okay. As I just found out, TextEdit has the same problem as my application, and it turns out it is using almost the same code (I didn't write the original pagination code in the app). To see it for yourself: 1. Download this RTF -

[SOLVED] Re: Properly wrapping non-contiguous NSTextViews

2011-08-17 Thread Nick Zitzmann
On Aug 17, 2011, at 10:59 AM, Ross Carter wrote: OK, I see the problem. It looks like your source text was copied from a web page. (Fonts Arial and Verdana are a clue.) There is something peculiar in your text formatting. I'll bet that the web page embedded that text in a table and the

Re: Properly wrapping non-contiguous NSTextViews

2011-08-16 Thread Ross Carter
On Aug 15, 2011, at 6:19 PM, Nick Zitzmann wrote: Of course, if there is a better way of using the Cocoa text system to layout multiple non-contiguous pages of text with margins, I'd like to hear about it. Maybe it'll even solve the problem I'm having. Well, it should just work without any

Re: Properly wrapping non-contiguous NSTextViews

2011-08-16 Thread Nick Zitzmann
On Aug 16, 2011, at 9:09 AM, Ross Carter wrote: On Aug 15, 2011, at 6:19 PM, Nick Zitzmann wrote: Of course, if there is a better way of using the Cocoa text system to layout multiple non-contiguous pages of text with margins, I'd like to hear about it. Maybe it'll even solve the problem

Re: Properly wrapping non-contiguous NSTextViews

2011-08-16 Thread Kyle Sluder
On Tue, Aug 16, 2011 at 9:59 AM, Nick Zitzmann n...@chronosnet.com wrote: But how? I can't use a single NSTextView because this is for a view where each text view corresponds to a single page of text, and so AFAICT text containers and views must be created manually as the layout manager lays

Re: Properly wrapping non-contiguous NSTextViews

2011-08-16 Thread Ross Carter
On Aug 16, 2011, at 12:59 PM, Nick Zitzmann wrote: On Aug 16, 2011, at 9:09 AM, Ross Carter wrote: On Aug 15, 2011, at 6:19 PM, Nick Zitzmann wrote: Of course, if there is a better way of using the Cocoa text system to layout multiple non-contiguous pages of text with margins, I'd like

Re: Properly wrapping non-contiguous NSTextViews

2011-08-16 Thread Nick Zitzmann
On Aug 16, 2011, at 12:00 PM, Kyle Sluder wrote: On Tue, Aug 16, 2011 at 9:59 AM, Nick Zitzmann n...@chronosnet.com wrote: But how? I can't use a single NSTextView because this is for a view where each text view corresponds to a single page of text, and so AFAICT text containers and views

Re: Properly wrapping non-contiguous NSTextViews

2011-08-16 Thread Nick Zitzmann
On Aug 16, 2011, at 1:20 PM, Ross Carter wrote: Right. You do have to add and remove the text containers and text views as needed. What I meant was, you shouldn't need to do anything to insure that the text is drawn correctly in the views and flows correctly between the containers. What

Re: Properly wrapping non-contiguous NSTextViews

2011-08-15 Thread Nick Zitzmann
On Aug 14, 2011, at 2:46 AM, Martin Wierschin wrote: You make it sound as if a single NSTextView is responsible for completely showing all the text in each NSTextStorage. In other words, that each of your NSLayoutManagers has exactly one NSTextContainer (and one NSTextView) associated

Re: Properly wrapping non-contiguous NSTextViews

2011-08-15 Thread Martin Wierschin
I don't know the particulars of your situation or what might be triggering the cutoff display (are they just descenders?), but have you tried reducing the height of the NSTextContainer while keeping your NSTextView height the same? (You'll have to disable automatic resizing). I did Can

Re: Properly wrapping non-contiguous NSTextViews

2011-08-15 Thread Nick Zitzmann
On Aug 15, 2011, at 2:22 PM, Martin Wierschin wrote: I don't know the particulars of your situation or what might be triggering the cutoff display (are they just descenders?), but have you tried reducing the height of the NSTextContainer while keeping your NSTextView height the same?

Re: Properly wrapping non-contiguous NSTextViews

2011-08-14 Thread Martin Wierschin
I think Ross's confusion stems from your statement that: There is one NSLayoutManager and one NSTextStorage behind each text view You make it sound as if a single NSTextView is responsible for completely showing all the text in each NSTextStorage. In other words, that each of your

Re: Properly wrapping non-contiguous NSTextViews

2011-08-14 Thread Ross Carter
On Aug 13, 2011, at 3:24 PM, Nick Zitzmann wrote: Each text view represents one page of text. None of the text views are embedded in individual scroll views, though all of the text views are subviews of a view that is in a scroll view. Think like a word processing app that shows multiple

Re: Properly wrapping non-contiguous NSTextViews

2011-08-13 Thread Ross Carter
On Aug 12, 2011, at 6:23 PM, Nick Zitzmann wrote: I've got a problem that has been driving me nuts all day. I tried searching around and didn't see anything that helped. I have a series of non-contiguous NSTextViews (not to be confused with non-contiguous NSLayoutManager layout), with

Re: Properly wrapping non-contiguous NSTextViews

2011-08-13 Thread Nick Zitzmann
On Aug 13, 2011, at 7:41 AM, Ross Carter wrote: On Aug 12, 2011, at 6:23 PM, Nick Zitzmann wrote: I've got a problem that has been driving me nuts all day. I tried searching around and didn't see anything that helped. I have a series of non-contiguous NSTextViews (not to be confused

Properly wrapping non-contiguous NSTextViews

2011-08-12 Thread Nick Zitzmann
I've got a problem that has been driving me nuts all day. I tried searching around and didn't see anything that helped. I have a series of non-contiguous NSTextViews (not to be confused with non-contiguous NSLayoutManager layout), with each text view representing a single page, and each text