On Sat, 2007-15-12 at 15:23 +0000, Alberto Valverde wrote: > iain duncan wrote: > > > > I think up to date samples and examples are needed, and just as badly, > > to *get rid* of the out of date stuff. > > Agree. I haven't updated tw.org for ages and the code there is very old. > Once the new site is up and running it should be fairly easy to keep the > sample code fresh since they're docstrings and ran by the test suite. > > > It is very easy for experienced > > developers not to remember how frustrating it is for a new user to try > > something out from a site and have it not work for unknown reasons. I > > tried checking out tosca widgets tonight, and I think I know TG widgets > > fairly decently, and well, I don't even know where to start. The sample > > code I found won't even import. > > > > from toscawidgets.widgets.forms import DataGrid > > from toscawidgets.widgets.forms.samples import AddUserForm > > Hmm, that should work. Have you installed twForms?
Aha, evidently not. I assumed ( erroneously ) that because I had toscawidgets through my pylong and tg2 check outs that I had everything. I see you do recommend installing it on the Toscawidget page. I will say that it seems strange that all of toscawidgets doesn't install with easy_install toscawidgets. Is there a reason for that? Will drink a big coffee and try some more! Iain > > I know this is a "known issue", but seriously, I have no idea where to > > start. > > I feel like I should look for something resembling TG widget usage, but > > where? :/ > > The AddUserForm (inside the twForms package, [1]) is a good example. > Note that the inner "fields" class is a syntax supported by TW but you > can perefctly declare the WidgetsList as a normal TG-like WidgetsLists > (ie: as a non-inner class) and use that instead (and concatenate them, > etc...). With that change you'll notice that a TW widget looks pretty > much like a TG widget after all :) > > Alberto > > [1] > http://trac.turbogears.org/browser/projects/ToscaWidgetsForms/trunk/toscawidgets/widgets/forms/samples.py > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
