[Zope] automated setting of object properties?

ÀÌ°ü¼ö kslee@plaza1.snu.ac.kr
Tue, 7 Sep 1999 15:45:23 +0900


Darran Edmundson wrote:

> not the case with version 1.x, at least for
> content import via the fsimport external method.
How about http://www.zope.org:18200/Members/kslee/pseudo_image. It has the source of something similiar to fsimport but  imports only images and sets height & width.
 


> I imported a slew of content with Zope 1.x and thus have
> a lot of images with height and width properties
> of 0.  I would like to write an external method
> to scan through my entire database setting the
> height/width fields to their correct values.  So
> far I haven't had any luck getting this to work.
> Any advice would be much appreciated.
<warning>
I'm writing from memory. It might not be wrong.
</waring>

As far as I read from the source of Zope 2.0bx, height/width properties are set when image objects are created. Since raw() method returns the raw data and Zope source or the above mentioned link has the part that sets height/width properties, you might be able to utilize manage_changeProperties() method in your external method.

However, if i were you, i'd wget & import again using fsimport(for Zope2.0 if any) or the tweaked version of the external method from the above link.

LEE Kwan Soo.