Problems with copying own objects
Hi! I've created two own objects, which cannot be copied. The first is derived from the DTMLMethod and the second one is derived from SimpleItem. An error which tells me that the Products doesn't support this operation is raised. It's line 375 of OFS/CopySupport.py. Other objects I derived from Folder or Image work fine. Thanks for help, Sebastian Queißer
Sebastian Queißer wrote at 2003-7-1 16:29 +0200:
I've created two own objects, which cannot be copied. The first is derived from the DTMLMethod and the second one is derived from SimpleItem. An error which tells me that the Products doesn't support this operation is raised. It's line 375 of OFS/CopySupport.py. Other objects I derived from Folder or Image work fine.
The destination does not allow to add objects of the given type (identified by the objects "meta_type"). Are your objects globally registered (this is usually done in the product's "initialize(context)" method with a "context.registerClass" call)? Dieter
Hi! Dieter Maurer schrieb:
Sebastian Queißer wrote at 2003-7-1 16:29 +0200:
I've created two own objects, which cannot be copied. The first is derived from the DTMLMethod and the second one is derived from SimpleItem. An error which tells me that the Products doesn't support this operation is raised. It's line 375 of OFS/CopySupport.py. Other objects I derived from Folder or Image work fine.
The destination does not allow to add objects of the given type (identified by the objects "meta_type"). But why? Could it be that the destination, which is an Object derived from Folder need anything special?
Are your objects globally registered (this is usually done in the product's "initialize(context)" method with a "context.registerClass" call)? Yes, they are registered, the one which works and the one which doesn't.
Thanks Sebastian Queißer
Dieter Maurer schrieb:
Sebastian Queißer wrote at 2003-7-1 16:29 +0200:
I've created two own objects, which cannot be copied. The first is derived from the DTMLMethod and the second one is derived from SimpleItem. An error which tells me that the Products doesn't support this operation is raised. It's line 375 of OFS/CopySupport.py. Other objects I derived from Folder or Image work fine.
The destination does not allow to add objects of the given type (identified by the objects "meta_type"). I found something new: Pasting of such an object in a normal folder works, so I think there's a problem with the derived folder object, where I would like to paste it.
Thanks Sebastian
Hi! I wrote:
Hi!
I've created two own objects, which cannot be copied. The first is derived from the DTMLMethod and the second one is derived from SimpleItem. An error which tells me that the Products doesn't support this operation is raised. It's line 375 of OFS/CopySupport.py. Other objects I derived from Folder or Image work fine.
I've solved the problem: The 'name' in the all_meta_types - tuple of my own folder, which I overwrote must be the same as the meta_type of the object, which should be copied in the folder. Thanks for help! Sebastian Queißer
participants (2)
-
Dieter Maurer -
Sebastian Queißer