[Seaside-dev] Re: [Seaside] returning a response in seaside 2.9

Julian Fitzell jfitzell at gmail.com
Wed May 20 14:53:23 UTC 2009


On Wed, May 20, 2009 at 5:28 AM, Lukas Renggli <renggli at gmail.com> wrote:
>  self requestContext response
>    contentType: WAMimeType textPlain;
>    nextPutAll: 'Hello World';
>    respond

We've discussed this before but it kind of doesn't make sense having
WAResponse implement #respond, I think, even though it convenient
because of cascading. What about:

self requestContext respond: [ :response |
    response
      contentType: WAMimeType textPlain;
      nextPutAll: 'Hello World' ]

A few more characters ("[ :response | ]") but not many and I think it
makes more sense. Obviously #response and #respond would still exist
for cases where you don't want to modify the response and respond at
the same time.

What do you think?

Julian


More information about the seaside-dev mailing list