[mcclim-devel] bug in incremental redisplay with OUTPUT-RECORD-HASH

Taylor Campbell campbell at bloodandcoffee.net
Fri Aug 12 21:05:39 UTC 2005


When redrawing a Climacs screen, either by hitting C-l or just moving
the screen around, I consistently got an error about OUTPUT-RECORD-HASH
having no applicable methods for STANDARD-BOUNDING-RECTANGLE.  After a
little analysis of incremental-redisplay.lisp, it looks like the first
method of OUTPUT-RECORD-HASH defined in incremental-redisplay.lisp
should be specialized on STANDARD-RECTANGLE, or at the very least
STANDARD-BOUNDING-RECTANGLE, instead of BASIC-OUTPUT-RECORD, because it
will at some point get a STANDARD-BOUNDING-RECORD that is not also a
BASIC-OUTPUT-RECORD:

The OLD-BOUNDS slot of UPDATING-OUTPUT-RECORD-MIXIN has an initform of
a call to MAKE-BOUNDING-RECTANGLE, which returns an instance of
STANDARD-BOUNDING-RECTANGLE.  COMPUTE-DIFFERENCE-SET (which is where
the error was signalled when Climacs borked) collects the values of
OLD-BOUNDS slots into a list and then puts elements of that list as
keys into a table, using OUTPUT-RECORD-HASH to convert them into keys.
Unless the OLD-BOUNDS slot is meant to be a BASIC-OUTPUT-RECORD
instance more specifically than a STANDARD-BOUNDING-RECORD, the method
isn't specific enough to handle this.  (The COORDINATES slot is defined
in the STANDARD-RECTANGLE class, which is why I suggested it as the
least specific possible class to specialize the OUTPUT-RECORD-HASH
method on, which just returns the value of that slot.)

I'm no McCLIM expert, so the solution of specializing the method
differently may be the wrong thing, and the right thing may be to fix
the value of the OLD-BOUNDS slot, but changing the specializer seems to
work here, and I don't have any specific suggestions on fixing it the
other way (changing the value of the OLD-BOUNDS slot).

Can anyone else comment on this fix or, if it is the right thing,
commit it?  (I'm told that it's Tim Moore's code.)




More information about the mcclim-devel mailing list