[Checkins] SVN: z3c.form/trunk/src/z3c/form/widget.txt More test coverage.

Stephan Richter srichter at cosmos.phy.tufts.edu
Wed Jul 18 16:47:10 EDT 2007


Log message for revision 78122:
  More test coverage.
  

Changed:
  U   z3c.form/trunk/src/z3c/form/widget.txt

-=-
Modified: z3c.form/trunk/src/z3c/form/widget.txt
===================================================================
--- z3c.form/trunk/src/z3c/form/widget.txt	2007-07-18 20:30:17 UTC (rev 78121)
+++ z3c.form/trunk/src/z3c/form/widget.txt	2007-07-18 20:47:10 UTC (rev 78122)
@@ -476,3 +476,35 @@
   <z3c.form.term.ChoiceTerms object at ...>
 
 So that's it. Everything else is the same from then on.
+
+
+Widget Events
+-------------
+
+Widget-system interaction can be very rich and wants to be extended in
+unexpected ways. Thus there exists a generic widget event that can be used by
+other code.
+
+  >>> event = widget.WidgetEvent(ageWidget)
+  >>> event
+  <WidgetEvent <Widget 'age'>>
+
+These events provide the ``IWidgetEvent`` interface:
+
+  >>> interfaces.IWidgetEvent.providedBy(event)
+  True
+
+There exists a special event that can be send out after a widget has been
+updated, ...
+
+  >>> afterUpdate = widget.AfterWidgetUpdateEvent(ageWidget)
+  >>> afterUpdate
+  <AfterWidgetUpdateEvent <Widget 'age'>>
+
+which provides another special itnerface:
+
+  >>> interfaces.IAfterWidgetUpdateEvent.providedBy(afterUpdate)
+  True
+
+This event should be used by widget-managing components and is not called
+internally by the widget's ``update()`` method.



More information about the Checkins mailing list