[Seaside] Working with proxies

Bany, Michel mbany at cincom.com
Tue Dec 14 16:54:03 CET 2004


Hello Avi,

While using Opentalk with Seaside on VW I came across
a difficulty with walkbacks. The symptom is that no html
output is sent back to the browser when a exception occurs
in the Seaside application. The reason is that there is
an exception during the rendering of the walkback, when
a proxy is the receiver in one of the stack frames.

I believe this issue with proxies was already adressed
a few weeks ago, however the check for being a proxy does
not port to VisualWorks.

In WAWalkback > renderStackFrame:on: the current code reads

((receiver class instSize > 0) and:
[receiver class allSuperclasses includes: Object]) ifTrue:

I suggest to refactor it by something like

((SeasidePlatformSupport isNotProxy: receiver) and:
[receiver class instSize > 0]) ifTrue:

This allows to check for a proxy before sending #class
and has the benefit of making the code more 'intention revealing'.

I am also suggesting to rewrite renderObject:labelled:on:
with something like this.

	| objectString |
	[objectString := (SeasidePlatformSupport isNotProxy: anObject)
		ifTrue: 
			[anObject printStringLimitedTo: 100]
		ifFalse: 
			[anObject printString]
	] on: Error
		do: 
		[:err | 
		objectString := 'error in printStringLimitedTo:'.
		html attributeAt: 'style' put: 'color: red'].
	html tableRowWithLabel: aString column: objectString.

If you would update the Seaside code base, that would make
the port to VW much cleaner.

Thanks in advance,
Michel.

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


More information about the Seaside mailing list