<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2657.73">
<TITLE>RE: [Seaside] 2.5a5 ported to VW</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Avi,</FONT>
<BR><FONT SIZE=2>My comments on your comments.</FONT>
</P>
<P><FONT SIZE=2>> Compile errors:</FONT>
<BR><FONT SIZE=2>> * WAComponent>>removeDecoration: - fixed</FONT>
<BR><FONT SIZE=2>Some more change is needed: </FONT>
<BR> <FONT SIZE=2>...</FONT>
<BR> <FONT SIZE=2>"Here too ==>" ifTrue: [dec owner: aDecoration owner. ^ self]</FONT>
<BR> <FONT SIZE=2>...</FONT>
</P>
<P><FONT SIZE=2>> * WAComponent>>show:onAnswer: - not actually a problem</FONT>
<BR><FONT SIZE=2>OK, but it would help for the port if the following statement was added near the</FONT>
<BR><FONT SIZE=2>beginning of the method, if it does not hurt, of course :</FONT>
<BR> <FONT SIZE=2>event := nil.</FONT>
</P>
<P><FONT SIZE=2>> * Seaside fails when trying to enable halos on the WACanvasTest component -</FONT>
<BR><FONT SIZE=2>> this is indeed a bug, but I don't like the fix: it ought to </FONT>
<BR><FONT SIZE=2>> be possible to enable halos on any component, regardless of which </FONT>
<BR><FONT SIZE=2>> renderer class it uses. I don't have a solution to this yet, but I don't see </FONT>
<BR><FONT SIZE=2>> much value in including the workaround in the meantime; better to remind </FONT>
<BR><FONT SIZE=2>> ourselves that this is broken.</FONT>
<BR><FONT SIZE=2>A fix to the bug could consist in adding to WARenderCanvas the behavior that</FONT>
<BR><FONT SIZE=2>is expected by WAHalo (#divClass:with: #anchorWithAction:text: #imageWithForm:).</FONT>
<BR><FONT SIZE=2>Here is another possible suggestion for fixing the bug.</FONT>
<BR><FONT SIZE=2>Since it uses #divClass:with: #anchorWithAction:text: and #imageWithForm:</FONT>
<BR><FONT SIZE=2>WAHalo expects a WAHtmlRenderer or a WARendererCompat as its renderer.</FONT>
<BR><FONT SIZE=2>On the other hand it also needs the renderer for the target component.</FONT>
<BR><FONT SIZE=2>This means that WAHalo needs two renderers. Although I am not sure Seaside</FONT>
<BR><FONT SIZE=2>will allow two concurrent renderers on the same document, here is how I see it.</FONT>
<BR><FONT SIZE=2>WAHalo would instantiate a second renderer for rendering the halo like this :</FONT>
</P>
<P> <FONT SIZE=2>WAHalo>>renderContentOn: html</FONT>
<BR> <FONT SIZE=2>| haloHtml |</FONT>
<BR> <FONT SIZE=2>haloHtml := self rendererClass </FONT>
<BR> <FONT SIZE=2>context: html context </FONT>
<BR> <FONT SIZE=2>callbacks: html callbacks.</FONT>
<BR> <FONT SIZE=2>haloHtml divClass: 'halo' with: [</FONT>
<BR> <FONT SIZE=2>... etc ...</FONT>
<BR> <FONT SIZE=2>haloHtml divClass: 'halo-contents' with: </FONT>
<BR> <FONT SIZE=2>[self perform: mode contents with: html].</FONT>
<BR> <FONT SIZE=2>].</FONT>
<BR> <FONT SIZE=2>html close.</FONT>
<BR> <FONT SIZE=2>haloHtml close.</FONT>
</P>
<P> <FONT SIZE=2>WAHalo>>source: html</FONT>
<BR> <FONT SIZE=2>| context haloHtml |</FONT>
<BR> <FONT SIZE=2>haloHtml := self rendererClass </FONT>
<BR> <FONT SIZE=2>context: html context </FONT>
<BR> <FONT SIZE=2>callbacks: html callbacks.</FONT>
<BR> <FONT SIZE=2>context := haloHtml context copy.</FONT>
<BR> <FONT SIZE=2>context clearMode.</FONT>
<BR> <FONT SIZE=2>context document: (WAPrettyPrintedDocument renderer: haloHtml).</FONT>
<BR> <FONT SIZE=2>haloHtml divClass: 'halo-source' with: [target renderWithContext: context].</FONT>
<BR> <FONT SIZE=2>haloHtml close.</FONT>
</P>
<P><FONT SIZE=2>Optimization is possible if the target's renderer happens to be directly usable.</FONT>
<BR><FONT SIZE=2>Note that WAHalo would need two renderers even if WAHalo was enhanced to use</FONT>
<BR><FONT SIZE=2>WARenderCanvas methods, because the target component may be using a non-canvas</FONT>
<BR><FONT SIZE=2>renderer.</FONT>
</P>
<P><FONT SIZE=2>Michel. </FONT>
</P>
<BR>
</BODY>
</HTML>