[Seaside-dev] WABuilder and Render Context

Esteban A. Maringolo emaringolo at gmail.com
Mon Aug 25 16:23:02 UTC 2014


I don't know about SVG documents. But what I do to generate small
chunks of HTML content is:

WAHtmlCanvas builder render: [ :html | html text: 'Hello world' ]

So maybe you should have your own WASvgCanvas and maybe a WASvgDocument too.

Regards!


Esteban A. Maringolo


2014-08-25 13:16 GMT-03:00 Maximilian Bareis <max.bareis at me.com>:
> 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?
>
> Regards
>
> Max
>
> _______________________________________________
> seaside-dev mailing list
> seaside-dev at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>


More information about the seaside-dev mailing list