Hi Alberto,

Yes, it's not backward compatible in a way that it requires an
SQLObject model beforehand instead of reading it from SelectResults.
This is intentional and I think now is a good time to make this change.
I probably should have indicated that explicitly, sorry for confusion.

My non-authoritative opinion that in this case DataGrid flexibility of
adapting to different model classes is actually harmful. Passing the
model explicitly is IMO better and safer. Plus, only a trivial change
required to DataController to init list_widget that way (it has
sql_class available at ctor).

OTOH, may be a good route could be to have a streamlined DataGrid class
that knows nothing about SQLObject's model and/or SelectResults (and
takes a single required ctor arg: fields) and then add, say,
FastDataGrid subclass that can derive fields from model (like my
NewDataGrid version did) or compute them at runtime (like yours version
did).

Reply via email to