[Seaside-dev] WABuilder and Render Context

phil at highoctane.be phil at highoctane.be
Mon Aug 25 16:44:44 UTC 2014


On Mon, Aug 25, 2014 at 6:31 PM, Maximilian Bareis <max.bareis at me.com>
wrote:

> Hi Esteban,
>
> the procedure is fine for small chunks that do not need a specific
> RenderContext.
>
> I am currently developing the tests for SeasideDynamicSVG package. There
> is everything already developed (own Canvas etc.) but I need to move it to
> Seaside 3.1. For that I am adding more testcases to ensure the stability.
>

Just using that package right now. Very cool and works for me after
fiddling around a bit.

By any chance, do you have any sample with SeasideDynamicSVG-JQuery ?

This

>>rawSVGContentOn: svg

svg anchor
callback: [ self info: 'Poked!' ] ;
 target: '_top' ;
with: [
svg circle
 stroke: Color black;
strokeWidth: 3 ;
fill: Color yellow;
 fillOpacity: 0.8 ;
opacity: 0.6;
center: 50 at 50;
 radius: 30
].

works but not really what I do want as it flashes the screen like a normal
link.

Google didn't told me much.

Phil


>
> The decent problem for this case is, that an AnchorBrush is created
> related to the Context:
>
> *anchorBrush := self context disableSVGAnchors*
> * ifTrue: [SVGDisabledAnchorBrush new]*
> * ifFalse: [SVGAnchorTag new].*
> * ^self brush: anchorBrush*
>
> So without having my own context I am not able to use the WABuilder to
> create a SVGDisabledAnchorTag.
> I could also create a subclass SVGBuilder but I think this feature may be
> useful also for WABuilder.
>
> Regards
>
> Max
>
> Am 25.08.2014 um 18:23 schrieb Esteban A. Maringolo <emaringolo at gmail.com
> >:
>
> 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
>
> _______________________________________________
> seaside-dev mailing list
> seaside-dev at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>
>
>
> _______________________________________________
> 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/20140825/f8d6ebff/attachment.htm


More information about the seaside-dev mailing list