[Seaside-dev] Decorators and DNU
Lukas Renggli
renggli at gmail.com
Tue Sep 25 21:27:49 UTC 2007
> There are two decorators, WAFormDecoration & WAWindowDecoration, that
> send non-standard messages to the next item in the decorator change.
I see this for WAFormDecoration, but not for WAWindowDecoration.
> This means that both of those decorators must decorate a component
> directly. Not clear if one would want to use both decorators on the
> same component. However one could eliminate any such conflicts by
> having the WADecoration class forward any message it does not
> understand to the next item in the decorator chain. Anyone see any
> problems in doing this?
Yes, #doesNotUnderstand: tricks are in 99.9% of the cases a bad
solution. The old rendering API had been suffering from this all the
years it existed. I had been bitten many times and I am personally
very happy that we don't have it in Seaside anymore.
I don't see any references to the #owner in WAWindowDecoration, so
this one should be safe on any decorated component. There are senders
of #owner in WAFormDecoration which make this decoration dependent on
on the order it is added. Probably it would be better to change these
senders to #component?
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch
More information about the seaside-dev
mailing list