Hi Florent!

Florent Guillaume wrote:
CMFCore.browser.typeinfo.FactoryTypeInformationAddView.getProfileInfos parses all the profiles types/*.xml files to check their meta_type. Why not check simply typesinfo.xml ?

The CMF 1.5 version of typesinfo.xml doesn't contain the meta_type. My plan was to parse old profiles as well, at least in CMF 1.6. I'll fix the parsing of old types/*.xml files, it doesn't work right now.

Besides that those add views are work in progress - I plan to add similar views for all tools. This will make changes in the shared code necessary.

Also, why is the meta_type information duplicated in typesinfo.xml and types/foo.xml?

The adapter for the container is responsible for creating empty sub-objects. So in this case the TypesToolXMLAdapter needs to know the meta_type information to find the correct class.

The meta_type information in types/foo.xml isn't strictly necessary, but it allows to see to which meta_type the XML file belongs and to check the meta_type before applying an XML file to an object.

I also could imagine situations where we want to use those XML files outside a profile that contains a typesinfo.xml.



Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to