On Jan 26, 2007, at 6:35 AM, Jeff Kowalczyk wrote:

>
> "Karl Guertin" wrote:
>>> The move to Genshi is actually pretty easy, typically. (It may even
>>> be somewhat automatable, thanks to XML).
>>
>> -1 on moving to Genshi pre-2.0. Genshi is still under development and
>> you cannot fully automate the transition due to the presence of
>> meaningful python code within the XML.
>
> It would be a useful improvement for 1.1 to simply support genshi and
> kid templates in widgets. I'd like to make any per-project widgets  
> with
> genshi instead of kid, starting as soon as possible. I'm looking
> forward to ToscaWidgets, of course.

I've tried adding support for Genshi in widgets in the trunk but it's  
broken (in fact, I'm going to revert the trunk's widgets to 1.0's).  
The problem lies mainly in the fact that widgets need to convert thir  
output based on the template language they're being displayed on,  
however, TG widgets have no knowledge of who their parent is. Things  
work ok when you insert a Kid widget into a Kid compund widget, but  
when you start mixing them (displaying kid on genshi or viceversa)  
then you have to manually convert output in your compound's template,  
which is impractical for templates like the forms which iterate over  
their children and have no knowledge of he output they will produce.

This is one of the reasons ToscaWIdgets exists. In order to fully  
support any template language some re-design had to be done so I  
decided to kill as many birds as possible with one shot and decoupled  
them from TG, ironed some wrinkles, etc... on the way.

To sum up, If you really need genshi in widgets I'd recommend  
switching to TW now. It's genshi support has been tested and it'll be  
less work to migrate widgets using the old API to the new one than to  
add (working) support for genshi in TG's widgets IMO. Besides that,  
TW provides other useful things and API improvements that TG widgets  
do not.

Alberto

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to