SmokeyD schrieb:
> Hey people,
> 
> I have a suggestion for the attrwrapper class of
> turbogers.widgets.DataGrid.Column.
> At the moment it is impossible to define a method as the value getter
> of the value of a cell in the DataGrid.
> It is possible to use DataGrid(fields=[('Name','name')]) but not
> DataGrid(fields=[('Name','getname()')]) or something similar. I
> defined my own DataGridMod where the attrwrapper.__call__ checks if
> the attribute is callable, and if so, calls it, if not, just returns
> the value of the attribute.
> Now when I use fields=[('Name','name')], it doesn't matter if 'name'
> is a method or an attribute.
> Other modifications are just to make sure this behaviour is working
> correctly.

After rereading your post, I do get what you are after now - but I still 
don't see the need. You can just pass


ModelClass.method

as argument - which I prefer, as this will catch any error earlier (at 
definition time of the grid, not at evaluation time of one row)

Diez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to