[Seaside-dev] WATagBrush>>#tag should be class side?

Esteban A. Maringolo emaringolo at gmail.com
Mon May 29 15:24:55 UTC 2017


I'm playing with a small utility that walks the canvas and the
hierarchy of WATagBrush, and one thing I find is that #tag method is
implemented on the instance side, whilst the class side requires a new
instance to obtain the HTML tag name.

In most cases this isn't an issue since brushes are simple, but in the
case of WABasicFormTag it tries to get the encoding from the request
context and you fail to obtain the tag unless within a context.

Since the returned value doesn't change based on conditions of the
brush [1], shouldn't #tag be implemented class side and instances
delegate to the class by default and implement only if necessary?

As far as I could see the change would be idempotent, even third party
subclasses of WATagBrush would continue to work if they don't
implement #tag class-side.

What do you think?

Esteban A. Maringolo

[1] The only case I found is the heading tag, that uses h1, h2, h3,
etc.;and it would continue to work.


More information about the seaside-dev mailing list