[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Formulator - FieldRegistry.py:1.1.2.2 SimpleRegistry.py:1.1.2.2 ValidatorRegistry.py:1.1.2.2 formulator-meta.zcml:1.1.2.2
Stephan Richter
srichter@cbu.edu
Fri, 1 Mar 2002 02:46:30 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Formulator
In directory cvs.zope.org:/tmp/cvs-serv7694
Modified Files:
Tag: srichter-OFS_Formulator-branch
FieldRegistry.py SimpleRegistry.py ValidatorRegistry.py
formulator-meta.zcml
Log Message:
- Implemented metaConfigure, in order to handle ZCML correctly.
=== Zope3/lib/python/Zope/App/Formulator/FieldRegistry.py 1.1.2.1 => 1.1.2.2 ===
- def register(self, name, field):
- return SimpleRegistry.register(self, name, field)
-
FieldRegistry = FieldRegistry(IField)
registerField = FieldRegistry.register
=== Zope3/lib/python/Zope/App/Formulator/SimpleRegistry.py 1.1.2.1 => 1.1.2.2 ===
'''See interface ISimpleRegistry'''
- object = resolve(object)
-
if name in self.objects.keys():
raise ZopeDuplicateRegistryEntryError(name)
=== Zope3/lib/python/Zope/App/Formulator/ValidatorRegistry.py 1.1.2.1 => 1.1.2.2 ===
__implements__ = (IValidatorRegistry,)
- def register(self, name, validator):
- return SimpleRegistry.register(self, name, validator)
-
ValidatorRegistry = ValidatorRegistry(IValidator)
=== Zope3/lib/python/Zope/App/Formulator/formulator-meta.zcml 1.1.2.1 => 1.1.2.2 ===
<directive name="registerField" attributes="name, field"
- handler="Zope.App.Formulator.FieldRegistry.registerField" />
+ handler="Zope.App.Formulator.metaConfigure.field" />
<directive name="registerValidator" attributes="name, validator"
- handler="Zope.App.Formulator.ValidatorRegistry.registerValidator" />
+ handler="Zope.App.Formulator.metaConfigure.validator" />
</directives>