Using TableEditor to view a list of object instances

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Using TableEditor to view a list of object instances

Brennan Williams
Just looking for a bit of guidance on using TableEditor....

Say I have a 'model' which has a list of 'dataset' objects, each of
which has a list of 'variable's. Each variable has a user defined 'name'
and a 'value'. All the datasets in the model have the same list of
variables, (same variable names but different values form dataset to

I want to use TableEditor to display in each row the dataset name and
the values of each variable.

So my column names are 'dataset name','variable 1 name','variable 2
name', ....

Typically when I use TableEditor I have explicit trait names in my
column definitions but in this case they are coming from

So if I have ....

     def create_table_editor(self):

how do I correctly set up the name and the label?

Do I possibly need to create some sort of temporary viewmodel object,
e.g. DatasetVariableViewModel?

Any help appreciated.


Enthought-Dev mailing list
[hidden email]