Re: [Zope] ZClass direct variable access
Phill Hugo writes:
Is there a way to access property sheet variables from a zclass method without knowing which property sheet it is contained within. If you only want to read them:
they are exposed as attributes of the Z Instance, i.e. you can use "getattr" to access them (as your property is an expression). For constant access, you could use the attribute access syntax. I do not know a way to change properties without the specification on the property sheet. Dieter
Dieter Maurer wrote:
Phill Hugo writes:
Is there a way to access property sheet variables from a zclass method without knowing which property sheet it is contained within.
If you only want to read them:
they are exposed as attributes of the Z Instance, i.e. you can use "getattr" to access them (as your property is an expression). For constant access, you could use the attribute access syntax.
Doh, of course. I tried everything other than getattr(). It works fine.
I do not know a way to change properties without the specification on the property sheet.
They are only edited from the property sheet manage pages anyway so this doesn't pose any problem. Thanks, Phill
participants (2)
-
Dieter Maurer -
Phill Hugo