Wichert Akkerman wrote:
Previously yuppie wrote:
The check for aq_base should be fine, but your example shows a second
issue: type() is used to get the factory. That only works if the class
is the factory.
So there seems to be indeed a need to store somewhere the factory name :(
I think we need that to get the export of placeless components as well.
Without it I can't seem to think of a way to determine how the component
should be created: using a factory method (which could be the class
type itself) or some other way.
If 'factory' is used, I also can't see a way to determine the factory
used on import.
If 'component' is used, there might be a solution: __module__ should be
set correctly. Maybe we can loop through the objects in the module and
compare them with our component?
But if we have to keep track of registrations anyway, it might be better
to do this for all kinds of registrations instead of using a hack.
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests