durusmail: quixote-users: Adding arbitrary attributes to widgets
Adding arbitrary attributes to widgets
2002-05-23
Adding arbitrary attributes to widgets
Neil Schemenauer
2002-05-23
On Thu, May 23, 2002 at 04:40:23PM -0400, Andrew Kuchling wrote:
> Some attributes, such as 'class' might make sense applied to all the
> subwidgets but for others

I disagree.  Adding a class to the subwidgets does not make sense.
Properties that should be on the subwidgets are usually the inherited
type.  While the extra class properties are not wrong they are
redundant.

> Thoughts?  (Neil, you had some reservations about the earlier
> suggestion.  Does this idea avoid them?)

Right now I think the whole concept is bad.  If you want to specify an
inherited CSS property like class for some widget you can wrap the
widget in a 'span' tag of that class.  Properties that are not inherited
are not inherited for a reason.  You need to apply them to a specific
element to get the desired effect.  I'm not sure what to do in that case
but maybe the widget should provide a specific __init__ keyword for that
property.  After all, only the widget knows it's own internal structure.

  Neil


reply