On Monday 29 August 2005 10:07, Alec Munro wrote: > def __setattr__(self, name, obj): > if self.mapping.has_key(name): > IDemographicInfo[name].validate(obj) > self.mapping[name] = obj > def __getattr__(self, name): > if self.mapping.has_key(name): > return self.mapping[name]
This looks correct, except that you want to bind the field before validation. bound = IDemographic[name].bind(self.context) bound.validate(obj) Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training _______________________________________________ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users