19.5. Widget BrowserThe Widget Browser is one of the most useful tools in the TurboGears Toolbox. We mentioned it in Chapter 16, "TurboGears Widgets: Bringing CSS, XHTML, and JavaScript Together in Reusable Components;" let's take a little bit more time to look at it in depth here. The Widget Browser makes use of a special feature of setuptools, which allows eggs to define an entry-point. Every widget package in the Cog Bin (www.turbogears.org/cogbin) has a specially-defined entry point. This allows the Widget Browser to dynamically grab information for every widget you have installed. The information is always up-to-date, and everything works. There is one exception to this rule. Some third-party widgets do not define a widget description class and will not show up in the Widget Browser. If you're wondering what a widget description does, it isn't at all complicated. It defines a default instantiation of the widget, which is used to display the widget in the Toolbox. As you can see in Figure 19.9, each widget is displayed with five tabs:
Figure 19.9. Widget Browser |