[Grok-dev] Custom grokker issue
Fernando Correa Neto
fcdoth at gmail.com
Sun Oct 7 12:24:47 EDT 2007
Hello everyone,
While trying to develop a new grok extension (still megrok.buffet), I
got stuck in a DuplicationError exception.
The basics:
class View(grok.View):
....
class BuffetViewGrokker(martian.Grokker):
component_class = megrok.buffet.View
....
BuffetViewGrokker is been grokked but the problem is that it seems
that something goes wrong when make_checker() is called.
Here is the pdb session traceback:
> /Users/fcorrea/groktemplates/megrok.buffet/src/megrok/buffet/grokker.py(86)grok()
-> make_checker(factory, factory, default_permission)
(Pdb) s
--Call--
> /Users/fcorrea/buildout-eggs/grok-0.10-py2.4.egg/grok/util.py(36)make_checker()
-> def make_checker(factory, view_factory, permission):
(Pdb) n
> /Users/fcorrea/buildout-eggs/grok-0.10-py2.4.egg/grok/util.py(42)make_checker()
-> if permission is not None:
(Pdb) n
> /Users/fcorrea/buildout-eggs/grok-0.10-py2.4.egg/grok/util.py(44)make_checker()
-> if permission is None or permission == 'zope.Public':
(Pdb) n
> /Users/fcorrea/buildout-eggs/grok-0.10-py2.4.egg/grok/util.py(45)make_checker()
-> checker = NamesChecker(['__call__'])
(Pdb) n
> /Users/fcorrea/buildout-eggs/grok-0.10-py2.4.egg/grok/util.py(48)make_checker()
-> defineChecker(view_factory, checker)
(Pdb) n
DuplicationError: <zope.exceptions.interfaces.DuplicationError
instance at 0x3662030>
I suspect that by subclassing grok.View is causing the mess with the
checker because I assume it already has a checker defined for that.
Is there something I can do to prevent this? Does anybody happened to
see this before?
Regards,
Fernando
More information about the Grok-dev
mailing list