I'm subclassing an AT content type, minus one field which i remove in this way:
MyClass(ParentClass):
(...)
my_schema = parent_schema.copy()
my_schema.delField('unusedField')
(...)
This works. However, the catalog tries to index this field [1]:
<index name="getUnusedField"
meta_type="FieldIndex">
<indexed_attr value="getUnusedField"/>
</index>
Calling the "getUnusedField" on ParentClass works. It also works on all other
classes. Only MyClass still has a generated accessor for the removed field,
calls it, and can't find the attribute. For more details on the setup, see
below. [2]
This is an edge case. I'm solving it by setting a dummy getUnusedField() method
on the MyClass class.
I was just wondering if I'm removing the field properly, or if there are better
solutions for preventing the error.
Kees
[1] Yes, Maurits, I know I shouldn't do this in catalog.xml, but that's not
relevant here.
[2] Plone 3.3.1, Archetypes 1.5.12
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers