>Some folks have expressed that they'd like forms to be like this:
class MyForm(TableForm):
foo1 = TextField()
foo2 = TextField()
>which is consistent with the SQLObject style, but is not consistent
>with how other widgets (TextField, for example) work.
The problem with the class based approach is that there's no way to
reconstruct the order of the fields in the class, which is required for
generating forms (of more than one field ;-). Since the fields are
defined in the class's dictionary, which is unordered, there's no way to
determine the order they appear in the source code, so you have to use
an array of fields instead.
Maybe you could hack around it by using a @decorator that recorded the
order it was applied to methods in another class variable. Oh, but those
are fields not methods. You can't apply decorators to fields, but you
could still call a function for every field that remembered its order.
Eww, that's gross, never mind...
-Don