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

CLOS Classes and Presentation Types



There seems to be a problem with CLOS classes that are also defined as
presentation types.  Presentation actions seem only to be available for
instances of the class itself and for instances of subclasses that had
instances at the time the presentation action was defined.

(defclass class-x () ())

(defclass class-y (class-x) ())

(defclass class-z (class-x) ())

(scl:define-presentation-type class-x (())
   :no-deftype t)

(make-instance 'class-y)

(scl:define-presentation-action print-class
   (class-x t :gesture :select)
   (class)
  (print class))

This example shows the problem.

(scl:present (make-instance 'class-x) 'class-x) works fine

(scl:present (make-instance 'class-y) 'class-y) works fine

(scl:present (make-instance 'class-z) 'class-z) doesn't work, the presentation
action is not available for the presentation

Did anybody notice this behavior? Is there a workaround?

Andreas Girgensohn
andreasg@boulder.colorado.edu