[Seaside-dev] WABuilder and Render Context

Maximilian Bareis max.bareis at me.com
Mon Aug 25 16:16:13 UTC 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside-dev/attachments/20140825/0f86be36/attachment-0001.htm


More information about the seaside-dev mailing list