[Zope] zclass & instances

Tino Wildenhain tino@wildenhain.de
Fri, 27 Jul 2001 19:33:02 +0200


Hi Edgardo,

try self.__class__.attribute vs. self.attribute
(This is only possible with external products
or if you subclass with a python product.

Regards
Tino

--On Donnerstag, 26. Juli 2001 15:52 -0300 Edgardo Zulian 
<ezulian@elsitio.com.ar> wrote:

> Hi,
>
> I have created a zclass who in the propertysheets has same properties like
> string, multiple lines, etc...with some default values that i give.
>
> When i create an instance of that zclass, it has those properties with the
> default values, but if i change one of those values, then when i make a
> change to the original zclass, the instance does not reflect me any more
> the changes...which is okey.
>
> So the question is:
>
> There is a way to know using for example an external method or perhaps
> with dtml, if an
> instance of a zclass is different from the zclass?
>
> I try using this:
>
> getattr(self,'meta_type')  but it's returning me the name of the zclass...
> is there any property or something wich tell me if my instance is
> different from my zclass?
>
> Thanks..
>
> Edgardo
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )