[Last email I promise]
Finally should we go with this style:
class ContactFields(WidgetsDeclaration):
age = TextField()
name = TextField()
or as from Jeff suggestion:
class ContactFields(WidgetsDeclaration):
TextField(name="age")
TextField(name="name")
plus for the latter is that it removes all the magic (regarding the
name parameter), and I agree with Jeff that it feels right.
But how does it feel from a python point? It's legal code inside a
class? :-)
Ciao
Michele
Michele Cella wrote:
> Jeff Watkins wrote:
> > On 20 Jan, 2006, at 10:12 pm, Kevin Dangoor wrote:
> >
> > > That's one of the cool things about making WidgetsDeclaration a
> > > list subclass:
> > >
> > > TableForm(widgets=[TextField("someotherfield")] + ContactFields())
> > >
> > > That would just work, because lists already support +.
> >
> > Excellent. I hadn't thought of that.
>> ...