CLIM mail archive

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

Postscript output and CLIM-Genera stream problem



 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!

 [ 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?

(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.

0,,

Follow-Ups:

Main Index | Thread Index