[Seaside-dev] WABuilder and Render Context

Maximilian Bareis max.bareis at me.com
Tue Sep 2 11:48:14 UTC 2014


Hi Johan,

perhaps I am a bit mistakable.

It is not possible to put ANY render Context into WABuilder, because WABuilder always creates a new one.
I do not want to create a custom Render Context. I want WABuilder to use the WARenderContext I have created and changed.

see 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 ]

My suggestion for a change is in the original mail (first one on thread).

Regards

Max



Am 30.08.2014 um 18:00 schrieb Johan Brichau <johan at inceptive.be>:

> 
> On 25 Aug 2014, at 23:48, Maximilian Bareis <max.bareis at me.com> wrote:
> 
>>> 
>> as I answered to Esteban, the creation of SVGAnchor depends on the state of the context. If the context has the state disableSVGAnchor the disabledAnchor is created otherwise the SVGAnchor is created. Why the disabled state is coupled to the context is beyond my knowledge, this needs to be answered by Johan or the creator of SVGCanvas>>anchor: 
> 
> I’m not the creator of the package and it’s been some years ago I actually looked at its code.
> From looking at the code, it seems the anchors are being disabled when the svg is being exported to a file. 
> 
> I’m not sure if this is a technical requirement or a convenience to prevent urls from a seaside app being exported to a file (which does not make sense).
> 
> If Holger (the original author) is still following this list, he might be able to comment…
> 
>> If you think you do not need this feature in WABuilder I will subclass it to SVGBuilder.
> 
> I’m not sure. You should have access to the renderContext from within your test and set the disabledAnchor flag without changing code to WABuilder.
> 
> I don’t understand the necessity to add an ability to put in your own rendercontext because:
> - you are still using a WARenderContext instance
> - you can manipulate the instance after constructing it:
> 
> 	WAHtmlCanvas builder render: [ :html |
> 		html context disableSVGAnchors: true.
> 		….]
> 
> Would the above not be sufficient (and avoid other refactorings?)
> 
> Johan
> _______________________________________________
> seaside-dev mailing list
> seaside-dev at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside-dev/attachments/20140902/969b7b16/attachment-0001.htm


More information about the seaside-dev mailing list