[Zope3-dev] widget question: propertyNames/getValue
Jim Fulton
jim at zope.com
Sat Feb 7 19:38:36 EST 2004
Garrett Smith wrote:
> I'm trying to make sense of propertyNames in the widget facility. From
> what I can see, propertyNames and getValue can be removed from IWidget
> (plus appropriate refactoring of existing code) without loosing
> functionality.
>
> 1 - Nothing in the core uses propertyNames outside the implementation of
> getValue.
>
> 2 - getattr can be called on a widget directly if you need to get an
> attribute by name.
>
> 3 - If propertyNames is used for documenting/listing fields supported by
> a widget, there are better ways to do this.
My opinion is that widgets should implement schemas that describe their
configuration data, which are exposed via attributes.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list