On 3/22/06, Alberto Valverde <[EMAIL PROTECTED]> wrote:
> You could try doing the conversion in the validator. The you don't
> care if it's compound or not because the validator can take care of
> all the translation:
>
>
> class MyValidator(FancyValidator):
>       def to_python(self, value, state=None):
>             # collect all sub widget values in 'value' and return a
> string
>       def from_python(self, value, state=None):
>             # get the string and build a dict to pass to the subwidgets
>
> class FancyCalendar(CompoundWidget):
>       validator = MyValidator()

FWIW, this has been the model that I've had in mind all along for
doing what Jason describes.

Kevin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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-trunk
-~----------~----~----~----~------~----~------~--~---

Reply via email to