Oops, forgot to CC the list.

On 9/27/06, John Maddison <[EMAIL PROTECTED]> wrote:
On 9/26/06, Fred Drake <[EMAIL PROTECTED]> wrote:
> 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.)

Ah, I think I may have misdescribed what I was trying to do - I'm not
trying to replace the root object, I'm trying to automatically create
some other objects to put inside it (without having to use the ZMI).
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to