Re: [Zope3-Users] Re: Autocreated content objects

2006-09-28 Thread Martijn Faassen
Fred Drake wrote: On 9/26/06, Baiju M <[EMAIL PROTECTED]> wrote: If this is a _bug fix_ and not a _feature_, can we port it to 3.3 also. Of cource in 3.3.1 release only. I think so. I've got to get some sleep now, but feel free to go ahead and backport it if like. If this is really a bugfix

Re: [Zope3-Users] Re: Autocreated content objects

2006-09-25 Thread Fred Drake
On 9/26/06, Baiju M <[EMAIL PROTECTED]> wrote: If this is a _bug fix_ and not a _feature_, can we port it to 3.3 also. Of cource in 3.3.1 release only. I think so. I've got to get some sleep now, but feel free to go ahead and backport it if like. -Fred -- Fred L. Drake, Jr. "Every sin

Re: [Zope3-Users] Re: Autocreated content objects

2006-09-25 Thread Baiju M
On 9/26/06, Fred Drake <[EMAIL PROTECTED]> wrote: On 9/25/06, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote: > Yeah, like Stephan says, Zope should probably send an > IObjectCreatedEvent there. In the mean time, you can hook into > IDatabaseOpenedEvent which gets sent every time Zope starts

Re: [Zope3-Users] Re: Autocreated content objects

2006-09-25 Thread Fred Drake
On 9/25/06, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote: Yeah, like Stephan says, Zope should probably send an IObjectCreatedEvent there. In the mean time, you can hook into IDatabaseOpenedEvent which gets sent every time Zope starts up and opens a connection to the ZODB. I've fixed the

[Zope3-Users] Re: Autocreated content objects

2006-09-25 Thread Philipp von Weitershausen
Tom Dossis wrote: mats.nordgren wrote: The IntId subscribers are fired on zope.app.container.interfaces.IObjectAddedEvent and IObjectRemovedEvent. That's correct, however the (IWrite)Container __setitem__ method invokes the ObjectAddedEvent for you when you add an object to the container. Yo

Re: [Zope3-Users] Re: Autocreated content objects

2006-09-25 Thread Tom Dossis
mats.nordgren wrote: > The IntId subscribers are fired on > zope.app.container.interfaces.IObjectAddedEvent and IObjectRemovedEvent. > That's correct, however the (IWrite)Container __setitem__ method invokes the ObjectAddedEvent for you when you add an object to the container. Your code below lo

Re: [Zope3-Users] Re: Autocreated content objects

2006-09-25 Thread mats.nordgren
The IntId subscribers are fired on zope.app.container.interfaces.IObjectAddedEvent and IObjectRemovedEvent. Cheers, Mats On Mon, 25 Sep 2006 18:55:11 +0200, Volker Bachschneider wrote > Philipp von Weitershausen schrieb: > > John Maddison wrote: > >> Is it possible/wise to "auto-create" content

Re: [Zope3-Users] Re: Autocreated content objects

2006-09-25 Thread Volker Bachschneider
Philipp von Weitershausen schrieb: John Maddison wrote: Is it possible/wise to "auto-create" content objects in the ZODB? Say Yeah, like Stephan says, Zope should probably send an IObjectCreatedEvent there. In the mean time, you can hook into That works fine to me, but: import transact

[Zope3-Users] Re: Autocreated content objects

2006-09-25 Thread Philipp von Weitershausen
John Maddison wrote: Is it possible/wise to "auto-create" content objects in the ZODB? Say I'm creating a blog application and have a container type(BlogContainer) and want an instance called "blog" in the root of the ZODB. Is it possible to programatically specify this, or is my only option