blob: ba68fcc1f8a0ce70a1a61f567bdc54db5ac0c46b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
(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)))
|