wiki:CompoundWidgets
Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Version 6 (modified by fredlin, 13 years ago) (diff)

space

Implementing and using CompoundWidgets

Introduction

In this section I'll descrbe how to build compound widgets and use them. For the time being, here's a commented CompoundWidget? demo TG widget's package. To install:

$ tar xvjf compounddemo.vN.tar.bz2
$ cd compounddemo
$ python setup.py develop
$ tg-admin toolbox

And watch the four eight examples at the toolbox's widget browser.

How was the egg built?

tg-admin can create the skeleton of a widget's egg like this:

tg-admin quickstart -t tgwidget compounddemo

It's the best way to reuse widgets among projects and to modularize your apps for easier maintenance. Best of all, they are easily re-distributed.

Once you install the resulting egg just import the widgets in your app and enjoy.

from compounddemo import MyCompound

w = MyCompound()

Attachments