[Bese-devel] Re: dummy question
Ties Stuij
cjstuij at gmail.com
Thu Apr 27 11:48:03 UTC 2006
On 4/27/06, Marco Baringer <mb at bese.it> wrote:
> "Ties Stuij" <cjstuij at gmail.com> writes:
>
> > Not to be confused with noob question, although it might come close.
> >
> > with-dummy-request-context works for me, as described in this list,
> > when i comment out the last line; e.g. it will render the component,
> > show the result and return the component:
> >
> > (when ,render
> > (render (context.window-component *context*))
> > (close-request (context.request *context*))
> > ;; (send-response (context.response *context*))
> > ))))
> >
> > If i don't comment it out i get an error message about the first value
> > in a vector not being of type character, eg the 72 in:
> >
> > 3: (SB-GRAY::BASIC-IO-TYPE-STREAM-WRITE-SEQUENCE
> > #<SWANK-BACKEND::SLIME-OUTPUT-STREAM {B4EC649}> #(72 84 84 80 47 49 46
> > 49 32) 0 NIL #<STANDARD-GENERIC-FUNCTION SB-GRAY:STREAM-WRITE-CHAR
> > (1)>)
> >
> > It looks like a bug but i don't know that much about streams yet.
>
> looks like, smells like a bug, tastes like a bug. but i'm unable to
> reproduce it using the latest ucw_dev, can you senhd a test case?
>
sure, well it couldn't be much simpler, which means i guess it should
always happen:
(in-package :it.bese.ucw-user)
(defcomponent hello-world (simple-window-component) ()
(:default-initargs :title "hi")
(:render () (<:as-html "hello world")))
Which outputs the beforementioned error. My guess was you wrote that
*trace-output* should be bivalent. And slime says it's stream is a
character stream. e.g. that's the reason it breaks on:
(WRITE-SEQUENCE #(72 84 84 80 47 49 46 49 32) *standard-output*)
which is called in http-send-headers which is called by send-response.
So i guess it makes sense. Now, unless there is a really easy way to
change the slime stream to a bivalent stream (which i guess there is,
although i searched hard) and if my assumptions are right, i would
rather not have send-response being called, since most people (read
"I") use slime. Or...
greets,
Ties
More information about the bese-devel
mailing list