Model Glue:Gesture - New Feature For Review - Default Event Types
Your Input Requested
After a deep discussion on the Model-Glue mailing list about Default Event Types we've come up with something that seems to work for everyone. Here is a special build with an implementation of Default Event Types for your review.
Explanation
As you know, Model-Glue Event Types allow classification of functionality and assignment to Event-Handlers. Event Types increase reusability, code-clarity and increase line-potency of Model-Glue applications. You can read more on Model-Glue Event Types here.
Where You Come In
We want to have a community review on this feature. Please take it for a test drive. Here is how you use it:
<event-type name="MyDefaultEventType">
<after>
<results>
<result do="template.main" />
</results>
</after>
</event-type>
<event-type name="AnotherEventType">
<after>
<results>
<result do="template.different" />
</results>
</after>
</event-type>
</event-types>
<!-- declares the default event type -->
<event-handlers defaultType="MyDefaultEventType">
<!-- inherits the defaultType -->
<event-handler name="page.1">
</event-handler>
<!-- overrides the defaultType and only gets AnotherEventType -->
<event-handler name="page.2" type="AnotherEventType">
</event-handler>
<!-- removes the defaultType -->
<event-handler name="page.3" type="">
</event-handler>
</event-handlers>
<!-- no default type declared -->
<event-handlers>
<!-- apply event type individually -->
<event-handler name="page.3" type="AnotherEventType">
</event-handler>
</event-handlers>
A special thanks to Chris Blackwell for providing a patch to enable this feature. Another thanks to Doug Hughes for helping me get the XMLModuleLoader unit tests sorted out.
http://www.btscene.com