[Seaside] Mewa & latest seaside

Julian Fitzell julian at beta4.com
Sun May 16 18:59:23 CEST 2004


Adrian Lienhard wrote:
> I've fixed the following method in Seaside which was broken because of 
> the new delegation implementation with decorators which Mewa uses now. 
> Is this correct, Avi?
> 
> WAComponent>>activeComponent
>     ^(self decoration == self or: [self decoration isDelegation not])
>         ifTrue: [self]
>         ifFalse: [self decoration delegate activeComponent]

I think that's not quite right, since you might some non-visible 
decoration as your first decoration and have the delegation further down 
the chain.  Your code probably works in practice, but makes assumptions 
that make it fragile.  Avi posted a message about this about a month ago 
suggesting:

> WAComponent>>activeComponent
>     self visiblePresentersDo: [:ea |  ea isDecoration ifFalse: [^ ea]]
> 
> However, I'm considering deprecating #activeComponent, since #visiblePresentersDo: is probably better for most purposes. 



More information about the Seaside mailing list