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

Retrieving documentation strings in CLOS



I'm having trouble retrieving documentation strings from class slots.
For example, if I do


(defclass foo ()
  ((bar :documentation "A useful description"))


and then


(let ((bar-slot-description
       (car (pcl::class-slots (find-class 'foo)))))
  (pcl::slotd-documentation bar-slot-description))


I get "", not "A useful description".  However, if I
use setf (using the same value for BAR-SLOT-DESCRIPTION as above),


  (setf (slotd-documentation bar-slot-description) "This works")


and then execute the let form above again, I get "This works".
It seems like the defclass just ignores the documentation strings
of slots.  What am I doing wrong?  Or is this not implemented in PCL?




Rodney Daughtrey           E-mail: rodney@huntsai.boeing.com
Huntsville AI Center               {major site}!uw-beaver!bcsaic!huntsai!rodney
Boeing Computer Services   Voice:  (205)-461-2352  Fax: (205)-461-2933