Thanks for the reply James, I do import the ClassAwareness library, but perhaps here is the mistake. Here is my full python script (and my first). import sys sys.path.append('usr/local/zope/lib/python/Products/ZCatalog') import CatalogAwareness """ CatalogAwareness contains the CatalogAware Class """ def manage_afterAdd(self,item,container) item.myparent=container.id CatalogAware.manage_afterAdd(self,item,container) return I also tried this, but it always gives the same error : def manage_afterAdd(self,item,container) import sys sys.path.append('usr/local/zope/lib/python/Products/ZCatalog') import CatalogAwareness item.myparent=container.id CatalogAware.manage_afterAdd(self,item,container) return Thanks, Tom. At 17:47 07/03/2000 +0800, James Henstridge wrote:
This may be a silly question, but have you imported CatalogAware from wherever it is defined, into the file where where the external method is? If not, try doing that.
James.
-- Email: james@daa.com.au WWW: http://www.daa.com.au/~james/
On Tue, 7 Mar 2000, Tom Deprez wrote:
def manage_afterAdd(self,item,container) item.myparent=container.id CatalogAware.manage_afterAdd(self,item,container) return
But then I get following error when adding an instance of the new class :
Zope Error
Zope has encountered an error while publishing this resource.
Error Type: NameError Error Value: CatalogAware
Troubleshooting Suggestions
This resource may be trying to reference a nonexistent object or variable CatalogAware. The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error.
Urgh, I'm really desperate. Do you know what I'm doing wrong?
ps. Why does this function has to be an external method? Is it also possible with an DTML method?
Regards, Tom.