Squeak needs printing capabilities

Reinier van Loon R.L.J.M.W.van.Loon at inter.nl.net
Wed Apr 8 23:31:34 UTC 1998

> On Wed 08 Apr, Tim Rowledge wrote:
> There is no need for _users_ of the facility to have to worry about
> the platform details, 
> but that does not mean that the implementation has to be buried in the
> In much the same way that filenaming
> details are handled (albeit poorly at the moment) by having platform
> specific subclasses, platform specific printing can  be catered for
> by having subclasses of some printing-interface class. 
I am not really a fan of this solution because people tend to use these
specific subclasses which does not make code portable to other platforms.

> Some parts may
> involve platform specific primitives, or better yet, systemcall code
> which avoids too much complication of the VM code. There need not be
> any troubling image size problem if the code is dynamically loaded.
Hmm. This systemcall code might look like (excerpt from printing.cs in

	Transcript show: 'sending to printer... '.
	"(ExternalProcess defaultClass forkJob: 'lpr' arguments: (Array with:
TempFileName)) wait."
	Transcript show: ' ...cannot print directly; to really print (on a UNIX
system), open a terminal window and type: lpr ' , TempFileName , '.'; cr! !

and like (excerpt from printers.cs in KSCSQK.ZIP)

	"Close the file, send it to the printer, and remove it."

	self closeAndSend.
	self cshPort sendBuffer: ('rm ', self interface name, '\') withCRs.!

This contains platformspecific commands like 'lpr' and 'rm'. I'd rather
have an abstract interface for printing a document. Maybe the only thing we
need at VM level is just 'lpr' (Unix) or 'copy lpt1:' (Windows/DOS) and the
corresponding primitive is called 'print'.

> The VM is already _way_ too complicated and convoluted. 
Really? I think it is not that bad. It is quite clean actually.

> -- 
> Useful Latin Phrases:- Utinam logica falsa tuam philosophiam totam
> suffodiant!
> May faulty logic undermine your entire philosophy!
Was this generated or intentionally put here? I am unsure if I should feel
offended now (my wife is good at Latin and when she heard/saw 'suffodiant'
she frowned because it was insulting in her opinion).

Anyway, it would be nice if we would have some rudimentary form of printing
and as long as the solution delivers portable code I'm a fan.

Best regards, Reinier.

More information about the Squeak-dev mailing list