On 9/26/06, John Maddison <[EMAIL PROTECTED]> wrote:
Right, that's basically what I want to run, but I can't seem to figure out how to have that run at ZODB creation time. Should I be listening for the event that Fred added (thanks!) and run that in the subscriber?
There are a couple of ways to go about this with the current codebase: 1) Listen for the IDatabaseOpenedEvent, and make sure you get there before the default subscriber does. Add your root before the default root is created. 2) Listen for the IDatabaseOpenedWithRootEvent, and be willing to replace the application root. You need to be sure that you're replacing it with an object that will support all the things you expect, since the default is an actual ISite implementation. (Not sure just how important that really is, though. Lots of code will expect it to be, but hopefully nothing really fundamental.) My proposed new event is what you really want, since it would only be triggered when an application root is needed. But I'd like some assurance that I'm not the only one who thinks that's the right approach before I bang out tests and code. -Fred -- Fred L. Drake, Jr. <fdrake at gmail.com> "Every sin is the result of a collaboration." --Lucius Annaeus Seneca _______________________________________________ Zope3-users mailing list Zope3firstname.lastname@example.org http://mail.zope.org/mailman/listinfo/zope3-users