[Zope] Re: accessing folder property
Maik Jablonski
maik.jablonski@uni-bielefeld.de
Thu, 09 Jan 2003 19:45:03 +0100
Chris Withers wrote:
> Maik Jablonski wrote:
>
>> you could use something like:
>>
>> if hasattr(self, 'propertyid'):
>> ... property exists in one of the parents...
>
>
> hmmm, this is probably betterL
>
> if self.hasProperty('propertyid'):
> ...property exists on self
>
Hi Chris,
I don't think your proposal is a solution for the problem... hasProperty
doesn't use acquisition, so you check only the current object for a
property. The original poster wanted to check if a property was set in
an aquired folder... sure, he can't rely on that
hasattr(self,'propertyid') is a property [=> can be any aquired object].
Cheers, Maik
--
German Zope User Group
http://www.dzug.org