CLIM mail archive

[Prev][Next][Index][Thread]

Postscript output and CLIM-Genera stream problem



    Date: Thu, 10 Dec 1992 00:17 EST
    From: Brent Reeves <brentr@sigi.cs.colorado.edu>

     btw, this newsgroup has to be one of the most useful anywhere.
     You guys do a super job of answering questions and providing
     support.  Thanks!

Oh, trying to make us feel guilty if we don't answer your questions, eh?
That's low, really low... :-)

     [ Genera 8.1  CLIM 1.1 ]

     1. with-output-to-postscript-stream generates a line which makes
     the .ps file unusable/unprintable.  The following command
     illustrates what I have to do to make the .ps file work, namely
     delete the "setrgbcolor" line.  Any better solutions?

My PostScript language reference manual gives no indication that the
setrgbcolor command should ever generate any sort of error, except for
the usual host of invalid operand errors.  So, what kind of a PostScript
printer do you have?  Maybe it thinks that, just because it is a B&W
device, it is excused from implementing the setrgbcolor command.

    (define-indy-command (com-ps :name t :menu nil)
      ((scale 'float))
      (with-open-file
       (file-stream
	"sigi:/homes/brentr/indy/src/testing/todel.ps"
	:direction :output)
       (clim:with-output-to-postscript-stream
	(stream file-stream
		:multi-page t)
	(with-scaling (stream scale scale)
		      (draw-work-area *af* stream))))
      ;;
      ;; now remove the offending " 1.00 1.00 1.00 setrgbcolor" line
      ;;
      (let ((eof '|EOF|)
	    line)
	(with-open-file
	 (input
	  "sigi:/homes/brentr/indy/src/testing/todel.ps"
	  :direction :input)
	 (with-open-file
	  (output
	   "sigi:/homes/brentr/indy/src/testing/indy.ps"
	   :direction :output)
	  (block exit
		 (loop
		  do (progn
		       (multiple-value-setq
			(line nil)
			(read-line input nil eof))
		       (when
			(equal line eof)
			(return-from exit nil))
		       (unless
			(string-equal " 1.00 1.00 1.00 setrgbcolor" line)
			(format output "~&~a" line))))))))
      (com-replay-history)
      (audit "~&Postscript file is
      sigi:/homes/brentr/indy/src/testing/indy.ps"))


     2. The command shown above works fine UNLESS the user has not
     logged on to the machine "sigi".  Normally under DW, a window
     will popup and prompt something like:

	"Enter password for logging on to SIGI or Escape to change
	userid"

     but CLIM instead just enters the debugger, since the CLIM stream
     evidently does not understand the method "get a password for
     liverlips so he can log on".  Is there any way from within CLIM
     to smooth this out?  I can get over it, (my fix is to issue a
     "COPY FILE" command at the Genera Listener, which prompts me for
     a password), but this doesn't work for users.

This is a known bug.  We are not sure yet of how to fix it.  I will bump
this a bit higher on my to-do list.

0,,

Follow-Ups: References:

Main Index | Thread Index