(uiop:define-package :simple-text-clim-frame/class (:export #:my-class #:my-display) (:import-from :asdf)) (in-package :simple-text-clim-frame/class) (defclass my-class () ((text-slot :initform #.(format nil "~{~a~^~%~}" (with-open-file (in (merge-pathnames #P"some.text" (asdf:system-source-directory "simple-text-clim-frame"))) (loop for line = (read-line in nil nil) while line collect line)))))) (defmethod my-display ((obj my-class) stream) (with-slots (text-slot) obj (princ text-slot stream)))