CLIM mail archive

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

delete-output-record-element - problems



    Date: Thu, 30 Jan 1992 03:20+0200
    From:     Ralf Nikolai <nicolai@gate.fzi.de>


    Hello CLIMers,
      I have some troubles with the handling of overlapping output-records. Because I'm
    not able to reproduce the error (?) in a small program, I try to explain the 
    circumstances just by words:
      I draw some (particulary filled) figures inside a with-new-output-record - macro.
    Just there I also draw a presentation-type with with-output-as-presentation. Some
    with-scaling - and with-translation -macros are needed. Now, if I want to hide my
    figure (= normal figures + presentation-type), I do it with delete-output-record-element
    (I did it with erase-output-record before, but got some troubles, too). After a 
    window-refresh the figure disappears. But: if I want to show it again (from inside a
    command) and call the same methods (I even called the display-method, no success!)   
    it appears, but sensitivity of my presentation is lost! A look in my output-recording-
    stream-output-record shows: there is my standard-presentation but coordinates have
    changed to negativ values! And in fact, I can find my presentation outside the viewport
    in the negative part of the coordinate-system. The other parts of the figure are still
    on there old place! Funny, eh?
      More facts: I work on a symbolics ux400s with CLIM1.0. Because of some other troubles
    with output-records I use a linear-output-record for the output-recording-stream-output-record.

     Is there anybody with simulary problems?
     Any hints, what I can do to solve them?

    With future thanks, Ralf.


    nicolai@fzi.de

I tried to reproduce the error situation you described, but I did not succeed.
However, here's my code:

;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: clim-demo -*-

(defvar *parent* (open-root-window :sheet))

(defvar *stream* (open-window-stream :parent *parent*
				     :output-record (make-instance
						      'clim::linear-output-record)))

(defun draw (stream)
  (flet ((new-presentation ()
	   (let (presentation)
	     (with-translation (stream -10 -10)
	       (with-scaling (stream 2 2)
		 (setf presentation
		       (with-output-as-presentation (:stream stream :object 'hi)
			 (draw-rectangle* stream 100 100 200 200 :ink (make-gray-color .4))))))
	     presentation)))
    (window-clear stream)
    (window-expose stream)
    (dotimes (i 2)
      (declare (ignore i))			
      (let ((presentation (new-presentation)))
	(accept 'symbol :stream stream)
	(erase-output-record presentation stream)
	;;(delete-output-record-element (output-record-parent presentation) presentation)
	(sleep 1)
	(window-refresh stream)))))

(draw *stream*)

The error doesnt't occur with erase-output-record nor with delete-output-record-element.
Maybe you can change/extend the code's functionality until you get the error reproducable
(outside your application).
I think that's the only way to get the bug proved in the case that nobody else
(especially Scott?) knows that this is really a CLIM bug.

Sorry, that I could't help more.

Markus Fischer
Consulting Services
Symbolics Systemhaus GmbH
Mergenthaler Allee 77-81
6236 Eschborn
West Germany



Main Index | Thread Index