[comp.sys.mac] When to call PrOpen?

brian@ut-sally.UUCP (09/02/87)

     When's the best time to call PrOpen in an application?  For now, I am
doing it at startup time.  I wonder what happens if the user uses Chooser to
select a different printer driver.  It seems to go okay, but I have my doubts.
Alternatively, I could call PrOpen at the beginning, and PrClose at the end,
of both my Page Setup and Print procedures.  Will this work?  Any suggestions
on the "right" way to do this?

Brian H. Powell
		UUCP:	{ihnp4,seismo,ctvax}!ut-sally!brian
		ARPA:	brian@sally.UTEXAS.EDU

   _Work_					 _Not Work_
  Department of Computer Sciences		P.O. Box 5899
  Taylor Hall 2.124				Austin, TX 78763-5899
  The University of Texas at Austin		(512) 346-0835
  Austin, TX 78712-1188
  (512) 471-9536

sysop@stech.UUCP (Jan Harrington) (09/02/87)

in article <8904@ut-sally.UUCP>, brian@ut-sally.UUCP (Brian H. Powell) says:
> 
> 
>      When's the best time to call PrOpen in an application?  For now, I am
> doing it at startup time.  I wonder what happens if the user uses Chooser to
> select a different printer driver.  It seems to go okay, but I have my doubts.
> Alternatively, I could call PrOpen at the beginning, and PrClose at the end,


Generally, I've called PrOpen at the head of my print module and PrClose at
the end of the print module.  There's no need to open and close the Print
Manager for every page, just at the beginning and end of a print job.  It takes
only a bit of time and is probably safer than doing so at the beginning and
end of an entire application.

Jan Harrington, sysop
Scholastech Telecommunications
{seismo,ihnp4}!husc6!amcad!stech!sysop