[Zope3-dev] widget question: propertyNames/getValue

Gary Poster gary at modernsongs.com
Thu Feb 12 17:40:42 EST 2004


I'd really like a schema of the configurables, though, because then we 
could make zcml do one of those "if I don't know the attribute I'll try 
to see if the widget class's schema knows about it, and use it to cast 
the zcml value" tricks.  You know, one of those.  :-)  So we could have
<addform ...>
   <widget class=".widgets.DatePicker" format="%Y-%m-%d" />
</addform>

where format is cast as appropriate, as defined in the widget 
configuration schema (ok, it's easy in this case, but you see what I 
mean), and then CustomWidgetFactory is called with the class, setting 
the format.

That would be nice.  Generating a view class on the file system just to 
make my text field display at 50 characters wide feels overly heavy to me.

Gary

Fred Drake wrote:
> 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
> 
> On Saturday 07 February 2004 07:38 pm, Jim Fulton wrote:
>  > My opinion is that widgets should implement schemas that describe their
>  > configuration data, which are exposed via attributes.
> 
> So there's no need to hold on to the existing propertyNames/getValue cruft.  
> Let's ditch those now!  Adding a simple base widget schema would be nice, 
> but doesn't seem necessary.  I'd be just as happy to say all of that is 
> implementation and not part of the interface.
> 
> 
>   -Fred
> 



More information about the Zope3-dev mailing list