Q: When I'm printing and I call PrClosePage after the end of the page,
I get a paramErr (-50) error. What's that mean?
A: There are two ways to get this error. The most common is to pass a
bad GrafPort to PrClosePage . If you don't pass back the port you got from PrOpenPage , then you will (rightfully) get an error.
The second way to get a paramErr from PrClosePage is more esoteric. If you've hidded the menu bar before printing, and leave it hidden, some drivers will report a paramErr when
PrClosePage is called. What's happening is that somewhere deep in the Print Manager, one of the Print Manager routines is calling a QD function with the Menu Bar's
rectangle as the parameter. This QuickDraw function sees the empty rectangle (because you've hidden the menu bar), and sets QDError to paramErr . The driver checks QDError
when it's done printing, sees the error, and sets PrError to the error.
Note:
this only happens on 68K machines, not on PPCs, although 68k QuickDraw in general does less error
checking, and seldom sets QDError .
|
|