[Zope-CMF] Re: GenericSetup TI listing

2005-12-13 Thread Florent Guillaume

On 13 Dec 2005, at 11:01, yuppie wrote:

Florent Guillaume wrote:
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.


Ok I thought it would be something like that. I don't like it but I  
don't see another option.


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.


Yes I agree that it's good to have it in types/foo.xml for  
consistency and self-sufficiency.


Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]


___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

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


[Zope-CMF] Re: GenericSetup TI listing

2005-12-13 Thread yuppie

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.



Cheers,

Yuppie

___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

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