I cannot seem to get pagination working. I've got a single NSView which includes many subviews tiled vertically (with a small gap between each for aesthetics). The subviews are each of a subclass of NSView. All the subclass does is override the basic set of 4 pagination methods (see below): If the page bottom occurs anywhere in the view, it is supposed to push the page bottom up to the top of the view. But it ain't working. It doesn't appear to be doing anything.
Using debugging, and logging (see commented out NSLog below), I've determined that the subclass' pagination methods are being called and they appear to be calculating the correct new bottom. But it doesn't seem to be used by the superview, or have any effect on printing.
The complete implementation of the NSView subclass is below (I've tried various values for the heightAdjustLimit from 0.0 to 1.0).
Any ideas?
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> #import "NoBreakView.h"
@implementation NoBreakView
- (void)adjustPageHeightNew

float *)newBottom top

float)top bottom

float)proposedBottom limit

float)bottomLimit
{
NSRect viewFrame = [self frame];
if ( proposedBottom > 0.0 )
*newBottom = viewFrame.size.height;
else
*newBottom = proposedBottom;
//NSLog(@"\nproposedBottom %f.0\nviewFrame height %f.0\nbottomLimit %f.0\nnewBottom %f.0", proposedBottom, viewFrame.size.height, bottomLimit, *newBottom);
}
- (void)adjustPageWidthNew

float *)newRight left

float)left right

float)proposedRight limit

float)rightLimit
{
NSRect viewFrame = [self frame];
if ( proposedRight > viewFrame.size.width )
*newRight = viewFrame.size.width;
else
*newRight = proposedRight;
}
- (float)heightAdjustLimit
{
return 0.9;
}
- (float)widthAdjustLimit
{
return 0.9;
}
@end
</pre><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">
<small>[ 07-25-2002, 10:27 PM: Message edited by: Brass ]</small>