2008/12/5 Martijn Faassen <span dir="ltr"><<a href="mailto:faassen@startifact.com">faassen@startifact.com</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi there,<br>
<div><div class="Wj3C7c"><br>
Paul Wilson wrote:<br>
> I am interested in extending grok with custom grokkers for my<br>
> application's purposes. My intention is to later allow developers to<br>
> extend my application with their own classes and I'd like to package<br>
> this functionality separately. I've been looking at megrok.* for<br>
> inspiration and think I need to include a meta.zcml (along with the<br>
> usual martian modules). So, am I correct in thinking that Grok uses<br>
> meta.zcml to register it's grokkers? Is there any documentation on how<br>
> this works or how to accomplish this?<br>
<br>
</div></div>You could also look at the grokcore.* packages for inspiration. I think<br>
grokcore.component's structure is nice enough (of course you wouldn't<br>
need to register the grok ZCML directive as it does in its meta.zcml).</blockquote><div><br>Okay, I'll take a look. Thanks.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Anyway, yes, we use meta.zcml to register the grokkers. meta.zcml will<br>
get loaded before the main configure.zcml (which contains the grok<br>
directive) so that the grokkers will be in place in time. If you use<br>
includeDependencies from z3c.autoinclude (which standard<br>
grokproject-created projects do), it'll include the meta.zcml first<br>
automatically when the dependency is listed in setup.py.</blockquote><div><br>Brilliant! Thanks for the hints, I'll have a go and see where I get :-)<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
There isn't any documentation yet as far as I know (check<br>
<a href="http://grok.zope.org?" target="_blank">grok.zope.org?</a>), but we'd love contributions!</blockquote><div><br>This is a very crucial part of my project that I'll really have to get to grips with, so when I've finished working out the details I'll happily write something!<br>
</div><div><br>Thanks,<br>Paul<br></div></div>