Re: [Zope-dev] ZPatterns bug with patch

2000-08-28 Thread Steve Alexander
"Phillip J. Eby" wrote: At 10:22 AM 8/27/00 +0100, Steve Alexander wrote: I've fixed this by adding a test to the start of __set_attr__ of DataSkins.py: def __set_attr__(self,name,val,_v_dm_=_v_dm_): + if name=='id' and val==self.__dict__['id']: + return

Re: [Zope-dev] ZPatterns bug with patch

2000-08-28 Thread Steve Alexander
"Phillip J. Eby" wrote: try: dm = self.__dict__[_v_dm_] except KeyError: if name=='id' and val==self.__dict__['id']: return raise Hopefully this should only perform the extra computations when the first part fails... Are Python classes derived from DataSkin

Re: [Zope-dev] ZPatterns bug with patch

2000-08-28 Thread Steve Alexander
Steve Alexander wrote: What rubbish! I didn't mean that at all! I think what I meant was this: try: dm = self.__dict__[_v_dm_] except KeyError: if name=='id': if self.__dict__.has_key('id') and val==self.__dict__.['id']: return else:

[Zope-dev] ZPatterns bug with patch

2000-08-27 Thread Steve Alexander
Zope 2.2.1, ZPatterns 0-4-1snap1 I can't add a Dataskin-derived ZClass beneath a Customizer Folder any more. I think the order of something in the initialization of ZClasses has changed in Zope. It appears that the DataSkin's datamanager isn't being found before __set_attr__ is called for the

Re: [Zope-dev] ZPatterns bug with patch

2000-08-27 Thread Phillip J. Eby
At 10:22 AM 8/27/00 +0100, Steve Alexander wrote: I've fixed this by adding a test to the start of __set_attr__ of DataSkins.py: def __set_attr__(self,name,val,_v_dm_=_v_dm_): + if name=='id' and val==self.__dict__['id']: + return dm = self.__dict__[_v_dm_] This