CompoundField + RichWidget?

Bill de hÓra <bill-h1s9WT/[email protected]> Mon, 12 Jun 2006 12:52:18 +0100
Newsgroups gmane.comp.web.zope.plone.archetypes.devel
Message-ID <[email protected]>
Hi,

I can create a CompoundField whose schema looks like this:

schema = Schema((
     CompoundField(
         name='myson',
         schema=Schema((StringField(name='firstname'),
	TextField(name='lastname',
           widget=RichWidget(),
          default_output_type='text/html'),),)
     ),
),
)

but attempting to edit the created object, results in a error:

[[[
Error Type
     TypeError
Error Value
     getContentType() takes exactly 1 argument (2 given)
Request made at
     2006/06/12 12:47:55.457 GMT+1
]]]

which seems to be coming from visual.pt:

[[[
URL: file:Archetypes/skins/archetypes/widgets/visual.pt
Line 30, Column 6
Expression: <PythonExpr here.getContentType(fieldName)>
Names:
]]]


Setting the CompoundField's widget as CompoundWidget produces the same 
error.

Removing the TextField's widget:

schema = Schema((
     CompoundField(
         name='myson',
         schema=Schema((StringField(name='firstname'),

	TextField(name='lastname',
          default_output_type='text/html'),),)
     ),
),
)

produces no errors.

Fwiw, I see another post from the 19th May [1] around CompoundField and 
Reference types.  Should I assume that CompoundField is only suitable 
for StringFields, and TextFields that do not use RichWidget()?

cheers
Bill

[1] 
http://permalink.gmane.org/gmane.comp.web.zope.plone.archetypes.devel/6020