Hi, I have a class with an dictionary containing on or more classes. The main class contains an image and the classes in the dictionary can contain images. I want to replace the content of the image in the main class with one of the classes in the dictionary. This won't work: self.afbeelding=self.edits[edit_id].afbeelding_edit. Somewhere the imagetype get lost. Any idea? Henny
Hi The Image class has a method update_data(self, data, content_type=None, size=None) so if you have 2 Image objects you can use: image1.update_data(image2.data) I think you can use this one. Dragos
Hi,
I have a class with an dictionary containing on or more classes.
The main class contains an image and the classes in the dictionary can contain images.
I want to replace the content of the image in the main class with one of the classes in the dictionary.
This won't work:
self.afbeelding=self.edits[edit_id].afbeelding_edit.
Somewhere the imagetype get lost.
Any idea?
Henny
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Thanks, That was the trick. ----- Original Message ----- From: "Dragos Chirila" <d.chirila@finsiel.ro> To: <zope@zope.org> Sent: Tuesday, March 30, 2004 6:43 PM Subject: Re: [Zope] replacing image without manage_upload
Hi
The Image class has a method update_data(self, data, content_type=None, size=None)
so if you have 2 Image objects you can use:
image1.update_data(image2.data)
I think you can use this one.
Dragos
Hi,
I have a class with an dictionary containing on or more classes.
The main class contains an image and the classes in the dictionary can contain images.
I want to replace the content of the image in the main class with one of the classes in the dictionary.
This won't work:
self.afbeelding=self.edits[edit_id].afbeelding_edit.
Somewhere the imagetype get lost.
Any idea?
Henny
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Dragos Chirila -
Henny van der Linde (zettai)