From: Sam S. <sd...@gn...> - 2002-09-07 16:46:22
|
> * In message <1031377382.2222.10.camel@work> > * On the subject of "[clisp-list] ((SETF STREAM-ELEMENT-TYPE) new-element-type stream)" > * Sent on 07 Sep 2002 17:43:02 +1200 > * Honorable Adam Warner <li...@co...> writes: > > I'm hoping you can help me understand how to create a Gray binary > output stream. see, e.g., describe.lisp in the CLISP sources for inspiration. > (setf bstream (make-instance 'FUNDAMENTAL-BINARY-OUTPUT-STREAM)) > #<FUNDAMENTAL-BINARY-OUTPUT-STREAM #x204490E5> what do you think this stream should do? > Then I attempt to set the STREAM-ELEMENT-TYPE according to the CLISP > specific impnotes (what's the cross-platform way?): > > ((SETF STREAM-ELEMENT-TYPE) '(unsigned-byte 8) bstream) > > *** - NO-APPLICABLE-METHOD: When calling #<GENERIC-FUNCTION (SETF > STREAM-ELEMENT-TYPE)> with arguments ((UNSIGNED-BYTE 8) > #<FUNDAMENTAL-BINARY-OUTPUT-STREAM #x204490E5>), no method is > applicable. before you can call a function, you have to define it. before you can write (setf (stream-element-type bstream) '(unsigned-byte 8)) you have to write (defmethod (setf stream-element-type) ((bstream fundamental-binary-output-stream))) what are you trying to accomplish? -- Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/> <http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html> If abortion is murder, then oral sex is cannibalism. |