[Seaside-dev] WABuilder and Render Context

Philippe Marschall philippe.marschall at gmail.com
Mon Aug 25 21:09:00 UTC 2014


On Mon, Aug 25, 2014 at 6:16 PM, Maximilian Bareis <max.bareis at me.com> wrote:
> Hi,
>
> I use WABuilder for creating small chunks of html-Code to test the SVGTags.
> Unfortunately it is not possible to pass a RenderContext into
> WABuilder>>render:
>
> WABuilder>>render: anObject
> ^ String streamContents: [ :stream |
> | context document renderer |
> ...
> context := WARenderContext new.
> ...
> renderer := self rendererClass context: context.
> self openDocument: document context: context.
> renderer render: anObject; flush.
> self closeDocument: document ]
>
> so I would like to change the method and split it up in two methods:
>
> WABuilder>>render:
>
> ^ self render: anObject withContext: WARenderContext new.
>
> and WABuilder>>render:withContext:
>
> WABuilder>>render: anObject
> ^ String streamContents: [ :stream |
> | context document renderer |
> ...
> context := aWARenderContext.
> ...
> renderer := self rendererClass context: context.
> self openDocument: document context: context.
> renderer render: anObject; flush.
> self closeDocument: document ]
>
> Is that OK and conforming to your development rules? How do I proceed if it
> is ok to implement?

Can you explain a bit why you need a custom WARenderContext?

Cheers
Philippe


More information about the seaside-dev mailing list