[Zope-dev] Python Product as DataSkin

Steve Alexander steve@cat-box.net
Mon, 19 Feb 2001 09:04:20 +0000


Michael R. Bernstein wrote:

 >
 > Hmm. I thought I was doing it wrong. Here is the error and traceback
 > from trying to instantiate the modified Product (through the
 > standard mgmt interface):
 >
 > This resource may be trying to reference a nonexistent object or
 > variable _v_dm_

<snipped>

 > Any ideas?

Is the __init__ method of DataSkin getting called?

This would happen if, for example, you define an __init__ method in your 
class, but you don't use something like:

from Globals import default__class_init__

default__class_init__(yourClass)

(At least, I *think* that's one of the things that default__class_init__ 
does. Otherwise, you'll need to make sure you call DataSkin.__init__ 
from your __init__ method, probably using Acquisition.inheritedAttribute.)

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net