Several of the widget attributes are defined as class attributes
instead of instance attributes.   The ones that trip me up are the
mutable ones including javascript and attrs.  There is probably a good
reason for these being class attributes, but for me it's been a problem
and seems unintuative.  Just today I accidently set a size attribute on
all my widgets using mytextwidget.attrs['size'] = 7 and it took me a
while to figure out why my select fields has a fixed size.

In what case would all widgets share the same attrs or javascript
attributes?  Seems to me these should be defined in __init__ and if
something needs to be shared by all instances of Widget, a seperate
attribute should be used.

Randall

Reply via email to