[Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Joshua Immanuel
Hello all, I am using zope.formlib.form package for my forms, when overriding the 'createAndAdd' method of form.AddForm I don't explicitly do the zope.event.notify(ObjectCreatedEvent(..)) call. I just add the data to self.context and it gets added (persisted) in the ZODB. But

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Charlie Clark
Hi Joshua, Am 08.06.2011, 10:34 Uhr, schrieb Joshua Immanuel j...@hipro.co.in: Hello all, I am using zope.formlib.form package for my forms, when overriding the 'createAndAdd' method of form.AddForm I don't explicitly do the zope.event.notify(ObjectCreatedEvent(..)) call. I just add

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Joe Steeve
Hello Charlie, On Wed, 2011-06-08 at 10:48 +0200, Charlie Clark wrote: From memory I can recall something similar related to making changes to copies of instance attributes but failing to apply them to attributes and needing to specifically go context.attribute = form_result for the changes

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Charlie Clark
Hi Joe, Am 08.06.2011, 11:05 Uhr, schrieb Joe Steeve j...@hipro.co.in: Supposing, we have a form action like: @form.action('Apply') def handle_edit(self, action, data): self.context.name += Blah This change is visible in subsequent requests. i.e if we view this

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Joe Steeve
Hello Charlie, On Wed, 2011-06-08 at 11:16 +0200, Charlie Clark wrote: I'm surprised at this but I'm not familiar with Bluebream's transactional processing. The quickest thing to do is to reenable notification and add a debug so that you can follow all the subscription calls and see what you

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Joe Steeve
On Wed, 2011-06-08 at 15:01 +0530, Joe Steeve wrote: We are killing the server with a Ctrl-C. Maybe something is not getting flushed out to the disk yet? Tried this with --daemon and --stop-daemon to paster. Still no change. So, this is not an issue. -- Joe Steeve HiPro IT Solutions Pvt. Ltd.

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Charlie Clark
Am 08.06.2011, 11:31 Uhr, schrieb Joe Steeve j...@hipro.co.in: How do we get the list of subscribers for a particular event? By checking the registry for all adapters registered. from zope.component import queryAdapter queryAdapter(object, interface) ... # check the syntax and make sure you

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Laurence Rowe
On 8 June 2011 10:05, Joe Steeve j...@hipro.co.in wrote: Hello Charlie, On Wed, 2011-06-08 at 10:48 +0200, Charlie Clark wrote: From memory I can recall something similar related to making changes to copies of instance attributes but failing to apply them to attributes and needing to

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Joe Steeve
As I mentioned on a follow-up post, we figured the 'Persistent' part. :) On Wed, 2011-06-08 at 13:29 +0100, Laurence Rowe wrote: My guess is that the ObjectModifiedEvent is dispatched to your object's parent and causes something to change there, with the side effect of storing your updated

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Marius Gedminas
On Wed, Jun 08, 2011 at 06:20:26PM +0530, Joe Steeve wrote: As I mentioned on a follow-up post, we figured the 'Persistent' part. :) On Wed, 2011-06-08 at 13:29 +0100, Laurence Rowe wrote: My guess is that the ObjectModifiedEvent is dispatched to your object's parent and causes something

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/08/2011 01:40 PM, Marius Gedminas wrote: On Wed, Jun 08, 2011 at 06:20:26PM +0530, Joe Steeve wrote: As I mentioned on a follow-up post, we figured the 'Persistent' part. :) On Wed, 2011-06-08 at 13:29 +0100, Laurence Rowe wrote: My guess

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Joe Steeve
On Wed, 2011-06-08 at 14:48 +0100, Laurence Rowe wrote: A BTree efficiently stores a large number of key,value pairs because the storage is split across a number of persistent objects (buckets) each of which stores a part of the tree, so only the bucket that changes needs to be stored when a

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Laurence Rowe
On 8 June 2011 20:47, Joe Steeve j...@hipro.co.in wrote: On Wed, 2011-06-08 at 14:48 +0100, Laurence Rowe wrote: A BTree efficiently stores a large number of key,value pairs because the storage is split across a number of persistent objects (buckets) each of which stores a part of the tree, so

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Joe Steeve
On Wed, 2011-06-08 at 21:46 +0100, Laurence Rowe wrote: Okay. So, if there are (say) 10 objects in a bucket. And, one of them changes. Then, are all 10 objects serialized again? If they are not persistent objects themselves then yes. Ok. That explains. Thank you :) -- Joe Steeve HiPro IT