Re: [Zope-dev] ZPatterns -- trigger add events not working

2000-07-12 Thread Steve Alexander
Steve Alexander wrote: You could have a flag in DataSkin instances called _has_been_added. It is initially cleared. It gets set when manage_afterAdd is called on it. The DataSkin sends an _objectChanging event only if the _has_been_added flag is set. Of course, the name of the attribute

Re: [Zope-dev] ZPatterns -- trigger add events not working

2000-07-12 Thread Steve Alexander
Steve Alexander wrote: "Phillip J. Eby" wrote: This would explain why you only get a change event, since if add happens after change, it is ignored. I'm curious how the change event is getting called first, since... Oh. I'll bet I know what it is. It's probably that

Re: [Zope-dev] ZPatterns -- trigger add events not working

2000-07-12 Thread Phillip J. Eby
It could cause a problem if the object is added after any other sort of change from the point of view of the Agent. The Agent would view it as having been added, when in fact it is actually merely changed. I have not, however, been able to think of any scenario where this condition could occur

Re: [Zope-dev] ZPatterns -- trigger add events not working

2000-07-11 Thread Steve Alexander
"Phillip J. Eby" wrote: This would explain why you only get a change event, since if add happens after change, it is ignored. I'm curious how the change event is getting called first, since... Oh. I'll bet I know what it is. It's probably that manage_afterAdd is being called later in the

Re: [Zope-dev] ZPatterns -- trigger add events not working

2000-07-11 Thread Steve Alexander
"Phillip J. Eby" wrote: This would explain why you only get a change event, since if add happens after change, it is ignored. I'm curious how the change event is getting called first, since... Oh. I'll bet I know what it is. It's probably that manage_afterAdd is being called later in