Re: [Zope-dev] ZPatterns AttributeProvider question

2001-04-23 Thread Christian Scholz
Hi! So here's more :) def _objectAdding(self,client, _tmap={ None:AddedStatus, DeletedStatus:ChangedStatus, ChangedStatus:AddedStatus } ): t = client._getTokenFor(self) s = t.status t.status =

Re: [Zope-dev] ZPatterns AttributeProvider question

2001-04-22 Thread Steve Alexander
Christian Scholz wrote: So what I do now as workaround is dtml method 1: - creates new object via newItem() - redirects to dtml method 2 dtml method 2: - retrieves the newly created object with getItem() - calls manage_changeProperties on that object This is working. Putting

Re: [Zope-dev] ZPatterns AttributeProvider question

2001-04-22 Thread Phillip J. Eby
At 03:07 PM 4/22/01 +0100, Steve Alexander wrote: As a simpler workaround, you can use your_object.commitSubtransaction() instead of redirecting to a new page. Um, this shouldn't be the issue here. _SetAttributeFor() should be called when the attribute is set; it's not transaction-driven.

Re: [Zope-dev] ZPatterns AttributeProvider question

2001-04-22 Thread Steve Alexander
Phillip J. Eby wrote: Steve Alexander wrote: As a simpler workaround, you can use your_object.commitSubtransaction() instead of redirecting to a new page. Um, this shouldn't be the issue here. _SetAttributeFor() should be called when the attribute is set; it's not transaction-driven.

Re: [Zope-dev] ZPatterns AttributeProvider question

2001-04-22 Thread Christian Scholz
Hi! A little update.. Actually I was mistaken and SetAttributeFor() is called. Just _objectChanged() is not called in that case.. and thus my attributes are not stored to the database. Also commit() is not called at all in this case. It get's called once when the subtranscation is committed but

Re: [Zope-dev] ZPatterns AttributeProvider question

2001-04-22 Thread Phillip J. Eby
At 08:29 PM 4/22/01 +0200, Christian Scholz wrote: Hi! A little update.. Actually I was mistaken and SetAttributeFor() is called. Just _objectChanged() is not called in that case.. and thus my attributes are not stored to the database. When an object is newly added, only _objectAdded() is

Re: [Zope-dev] ZPatterns AttributeProvider question

2001-04-22 Thread Phillip J. Eby
At 08:29 PM 4/22/01 +0200, Christian Scholz wrote: Hi! A little update.. Actually I was mistaken and SetAttributeFor() is called. Just _objectChanged() is not called in that case.. and thus my attributes are not stored to the database. When an object is newly added, only _objectAdded() is

Re: [Zope-dev] ZPatterns AttributeProvider question

2001-04-22 Thread Christian Scholz
Hi! Just a quick note as it's quite late already (more tomorrow): In the early days of ZPatterns, I assumed that I would create SQL providers, LDAP providers, and suchlike gizmos. Later, it became clear that it was more useful to have a simple "glue" language to allow harnessing the full

Re: [Zope-dev] ZPatterns AttributeProvider question

2001-04-21 Thread Steve Alexander
Christian Scholz wrote: Good evening everybody! I have some question regarding attribute and agent programming for ZPatterns. I have some provider which is registered for the "handlers" and "attributes" methods and some attributes. My problem is when trying to create a new object and

Re: [Zope-dev] ZPatterns AttributeProvider question

2001-04-21 Thread Christian Scholz
Hi! Good evening everybody! I have some question regarding attribute and agent programming for ZPatterns. I have some provider which is registered for the "handlers" and "attributes" methods and some attributes. My problem is when trying to create a new object and directly

Re: [Zope-dev] ZPatterns AttributeProvider question

2001-04-21 Thread Phillip J. Eby
At 08:18 PM 4/21/01 +0200, Christian Scholz wrote: Hi! Good evening everybody! I have some question regarding attribute and agent programming for ZPatterns. I have some provider which is registered for the "handlers" and "attributes" methods and some attributes. My problem is