Hi people,
I'm proud to announce that ToscaWidgets 1.0a1 has been released. I've been using it in various apps I'm working with and I'm already quite happy with the API so now it's time to stabilize it.
From now on projects using TW shouldn't be breaking anymore without
notice (if they do please file a bug!). I'll try my best to provide aliases and/or DeprecationWarnings when neccesary. So, what's "new" in ToscaWidgets? * Supports any template engine plugin which provides a Buffet interface. I have tested mixing widgets that use Genshi, Kid, Mako, Cheetah and string.Template templates. * The way compound widgets are built has been simplified and made more powerful. Every widget can be a compound. Child widgets are passed in a list as a "children" parameter to the constructor or can be set directly as a class attribute when subclassing. There's no longer a "member_widgets" list. All widgets have a "parent" attribute which references their parent (if any). This allows you to traverse the widget tree from any widget and know the *real* DOM id a widget will have at any time. This is *very* useful to generate JS code programatically. Read on... * The js module API is now stable. This module is used to generate JS calls from widgets (either on initialization or during a request) which will be automatically placed at bodybottom. This is very handy to initialize the JS needed by some widgets *without* altering their template (to include <script> tags a là 1.0). Take a look for example at twTinyMCE which can now subclass TextArea without altering it's template, the calendars at twForms also use the same technique. * You no longer need to register_static_directories for JS and CSSLinks. These are registered automatically when Links are initialized so that's less bolier-plate for you. The syntax is also friendlier and takes care of finding the full path for resources for you: JSLink(modname='turbogears', filename='static/js/MochiKit.js') will automatically link to the mochikit TG 1.0 bundles (uses pkg_resources.resource_filename internally) * You can use ToscaWidgets in any WSGI compliant framework/app. There are people currently using TW in TG 1.0, Pylons and web.py AFAIK. Migration from TG widgets should not be very hard... if anyone has any problems with migrating their widgets I'd gladly help them out :) I'd like to write up some examples and maybe a tutorial soon when I can spare some time and I feel eloquent enough ;) For the time being, the best source of examples is the "examples" directory inside the source distribution and the widgets inside twForms (port of turbogears.widgets.forms), twMochiKit, twJQuery (available at SVN) and twTinyMCE (this one shows some of the new techniques TW allows) Enjoy! :) 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 -~----------~----~----~----~------~----~------~--~---
