Is it acceptable to use -knowsPageRange to generate page rects?
Is it acceptable to use -knowsPageRange to generate page rects?
- Subject: Is it acceptable to use -knowsPageRange to generate page rects?
- From: Paul Bruneau <email@hidden>
- Date: Thu, 29 Nov 2007 14:30:02 -0500
Hi-
In the continuing saga of my production scheduling program (which has
benefited so much from the kind help of this list), I am currently
implementing printing of production schedules with custom pagination.
I have a list of work centers each with order steps that must appear
on the printout. Several related work centers (or just one) may
appear on one or more pages, followed by a page break before the next
group of work centers.
Work Center A
-some work to be done
-some more work to be done
Work Center B
-B's work to be done
-some more work
---------- page break ----------
...more work centers, etc
It seems to me that since the -knowsPageRange method of my print view
(which I have just written) must go through all of my work center
data to determine when the pages should break in order to count them,
it could also generate and store aside the rect for each page in an
array as it does so.
Then my -rectForPage method could access that information to return
the correct rect for the requested page without having to go through
the nearly identical computations again.
Does this make sense and not violate anything? If this is commonly
done (I can't be the first to think of this), did I miss discussion
of it Apple's printing docs? Their custom pagination example is very
simple (which they admitted) and to my mind didn't really discuss the
issues that arise in an actual custom pagination situation.
http://developer.apple.com/documentation/Cocoa/Conceptual/Printing/
Tasks/PaginatingViews.html#//apple_ref/doc/uid/20000912-BBCHHAHI
Thank you
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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