VanL wrote:
I then do the following when I create the object:
a = Apple.Apple(thisID) self._setObject(thisID, a) a = self._getOb(thisID) # Now try to set the typelist property PropertyManager.manage_addProperty(a, 'apple_type', a.get_apple_type, 'select', None)
Surely the above should be: a.manage_addProperty('apple_type',a.get_apple_type(),'select')
I can refresh the product fine, but when I try to add an apple, I get the following error:
*Error Type: UnpickleableError* *Error Value: Cannot pickle objects
well, I reckon that may have been 'cos you actually ended up adding the get_apple_type method object as an attribute of your apple rather than the result of calling that method (see my added brackets in the above code). Method objects aren't pickleable, which hopefully explains your error. cheers, Chris