Define ACCEPT method for classes.

master
Robert Strandh 7 years ago
parent 9e40373863
commit 197fdd4bf9

@ -18,7 +18,7 @@
(declare (ignore acceptably for-context-type))
(format stream "Text ~a ~a"
(name (author object))
(substitute #\Space #\Newline (subseq (contents object) 0 30))))
(substitute #\Space #\Newline (subseq (contents object) 0 20))))
(clim:define-presentation-method clim:present
(object
@ -31,3 +31,22 @@
(name (composer object))
(name (performer object))))
(clim:define-presentation-method clim:accept
((type class)
stream
(view clim:textual-view)
&key)
(multiple-value-bind (object success string)
(clim:complete-input
stream
(lambda (so-far action)
(clim:complete-from-possibilities
so-far
(loop for class-name in '(object person music text-document)
collect `(,(string-downcase class-name)
,(find-class class-name)))
'()
:action action))
:partial-completers '(#\Space))
(declare (ignore success string))
object))

Loading…
Cancel
Save