Is the point here that you have a set of important special-case actions
and for those you can just auto-generate the code? Is your set of
special-case actions somehow linked to the set of on- events that
are provided by the widget?
Shriram