From Martin Maechler <maechler@stat.math.ethz.ch>  Mon Jan 12 16:38:16 1998
From: Martin Maechler <maechler@stat.math.ethz.ch> (Martin Maechler)
Date: Mon, 12 Jan 1998 17:38:16 +0100
Subject: Default device instead of ``No graphics device is active''
Message-ID: <199801121638.RAA01160@sophie.ethz.ch>

in RHOME/src/ :
	grep DevInit */*.[ch]
reveals only a few calls such as

	if(!DevInit) error("No graphics device is active\n");

(in graphics/graphics.c  and  main/par.c).

Couldn't we startup a default device instead of having the error message?

The Default device would be

	Unix, interactive:	x11
	Unix, batch:		postscript
	
	Win,  interactive:	windows
	Win,  batch:		postscript ??

	Mac,  interactive:	macintosh
	Mac,  batch:		postscript  ????

[ one could even  define

	default.device <- x11		
  in Rprofile.unix, etc.

 and have the same .First function  
	(which could be moved out of profile to base

  .First <- function() if(interactive()) default.device()
]

-- If I remember properly, this is also  how S4 behaves..

Martin
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


Default device instead of ``No graphics device is active''
Martin Maechler