[Seaside] 2.5a5 ported to VW

Bany, Michel mbany at cincom.com
Tue Jul 6 13:34:21 CEST 2004


Avi,
My comments on your comments.

> Compile errors:
> * WAComponent>>removeDecoration: - fixed
Some more change is needed:	
				...
	"Here too ==>"	ifTrue: [dec owner: aDecoration owner.  ^ self]
				...

> * WAComponent>>show:onAnswer: - not actually a problem
OK, but it would help for the port if the following statement was added near
the
beginning of the method, if it does not hurt, of course :
	event := nil.

> * Seaside fails when trying to enable halos on the WACanvasTest component
-
> this is indeed a bug, but I don't like the fix: it ought to 
> be possible to enable halos on any component, regardless of which 
> renderer class it uses.  I don't have a solution to this yet, but I don't
see 
> much value in including the workaround in the meantime; better to remind 
> ourselves that this is broken.
A fix to the bug could consist in adding to WARenderCanvas the behavior that
is expected by WAHalo (#divClass:with: #anchorWithAction:text:
#imageWithForm:).
Here is another possible suggestion for fixing the bug.
Since it uses #divClass:with: #anchorWithAction:text: and #imageWithForm:
WAHalo expects a WAHtmlRenderer or a WARendererCompat as its renderer.
On the other hand it also needs the renderer for the target component.
This means that WAHalo needs two renderers. Although I am not sure Seaside
will allow two concurrent renderers on the same document, here is how I see
it.
WAHalo would instantiate a second renderer for rendering the halo like this
:

	WAHalo>>renderContentOn: html
		| haloHtml |
		haloHtml := self rendererClass 
					context: html context 
					callbacks: html callbacks.
		haloHtml divClass: 'halo' with: [
			... etc ...
			haloHtml divClass: 'halo-contents' with: 
				[self perform: mode contents with: html].
			].
		html close.
		haloHtml close.

	WAHalo>>source: html
		| context haloHtml |
		haloHtml := self rendererClass 
						context: html context 
						callbacks: html callbacks.
		context := haloHtml context copy.
		context clearMode.
		context document: (WAPrettyPrintedDocument renderer:
haloHtml).
		haloHtml divClass: 'halo-source' with: [target
renderWithContext: context].
		haloHtml close.

Optimization is possible if the target's renderer happens to be directly
usable.
Note that WAHalo would need two renderers even if WAHalo was enhanced to use
WARenderCanvas methods, because the target component may be using a
non-canvas
renderer.

Michel. 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20040706/b1300d5c/attachment.htm


More information about the Seaside mailing list