Hi there
is it possible to use the CompoundField.ArrayField for more than 1 field
at the same time?
I'd like to have an array of <image+imagetitle> pairs and tried this:
ArrayField(
atapi.ImageField('image',
searchable = 0,
required = 0,
max_size = (380, 220),
allowable_content_types = ('image/gif','image/jpeg','image/png'),
widget = atapi.ImageWidget(label = u'Image'),
),
atapi.StringField('image_title',
widget = atapi.StringWidget(label = u'Image title', size = 150),
),
),
Unfortunately, this doesn't seem to work, see the traceback below.
Exception type: TypeError
Exception value: range() integer end argument expected, got StringField.
Traceback (most recent call last):
File "/zope/plone/Products/teaserpage/teaserpage.py", line 29, in ?
widget = atapi.StringWidget(label = u'Image title', size = 150),
File "/zope/plone/Products/CompoundField/ArrayField.py", line 145, in
__init__
self.resize(size)
File "/zope/plone/Products/CompoundField/ArrayField.py", line 180, in
resize
for i in range(max(size,1)):
TypeError: range() integer end argument expected, got StringField.
Any idea how I can use the ArrayField class for my use case?
Thanks in advance,
Nico
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects_______________________________________________
Archetypes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/archetypes-users