C H A P T E R 2 1
Then the print format view is closed. Note that the
messages are not sent to the view. This takes a lot of time
for the transport to determine the number of pages, so if you can, override the
method with one of your own.
3. The transport instantiates the print format view and sends it the
message. Depending on certain factors, the transport
connection might be made at the beginning of this step or in step 4. You can rely
only on the connection being made sometime after step 2.
4. The transport sends the
message to the print
format view, then the child views are instantiated (and sent the standard view
messages), and finally the transport sends the
messages to the view.
5. The transport draws the print format view and sends the
message to the view. Note that each child view on the page is also drawn and sent
message, in hierarchical order. The page might be printed
or faxed in "bands" (sections), so this step may repeat several times for the page.
If you need to draw something in your
method, you can call
the view method
to determine the band that is currently being
drawn. Then you can draw just those shapes that are necessary for the current
band. The transport does not draw any views or shapes outside the current band.
Any shapes extending outside the current band are automatically clipped.
message is sent at a time-critical point
in a fax operation. It is imperative that you do as little work as
possible in the
6. The transport sends the
message to the print format
view. If your print format handles more than a single page of data, you must
method in your print format. The transport
sends this message each time it reaches the end of a page, to allow you to
construct the next page of data. While there is more data to route, this method
should return a non-
value; in that case, the printing process continues
with the next page at step 4. When there is no more data to route, the
method should return
; in that case the printing
process ends and the connection is closed.
You set up the child views containing the data for the first page in the
method of your print format. Typically, you do
this by setting the value of the
array. Don't forget to call the
inherited method (
) so that the
proto behavior is preserved.