Hi there,
I started to look into GenerigSetup.
Wat I would like to to is to replace functionalities we have in a
similar product of our own (RedPick)
with GernericSetup.
Now my first question:
Does GenericSetup work with Zope 2.8.5 at all?
If yes:
in an instance of class of which the the relevant part is attach at the
end of this email
I call XX.exportSiteToFile(..)
It works insofar as I can call it from our tool (in a Plone 2.1.2 Site)
and it
does not generate any errors. However it does not produce any output.
I debugged it as far as
GenericSetup.utils.exportObjects
..
exporter = zapi.queryMultiAdapter((obj, context), IBody)
..
body = exporter.body
body is None therefor nothing happens.
Now my question:
what do I have to do to get an exporter with a body?
thanks
robert
Here the class definition:
has_setup_tool = 0
*try*:
from Products import GenericSetup
*try*:
from Products.CMCore.exportimport import actions
from Products.CMCore.exportimport import typeinfo
has_setup_tool = 1
*except*:
/# verbatim copy of exportimport from/
/# Plone.2.5 CMFCore /
*try*:
from Products.RedPick.exportimport import actions
from Products.RedPick.exportimport import typeinfo
has_setup_tool = 1
*except*:
*pass*
*except*:
*pass*
*class* handle_action_properties( handle_base ):
"RedPick handler for action properties."
/# interface to CMFSetup/
*def* exportSiteToFile( self, **kwargs ):
"Export current site information to external file."
/#return self.writeToFile( self.getFromSite( **kwargs ) )/
*if* has_setup_tool:
context =
GenericSetup.context.DirectoryExportContext(self.portal.red_pick_tool,
os.path.split(self.filename)[0])
actions.exportActionProviders(context)
...
begin:vcard
fn:robert rottermann
n:rottermann;robert
email;internet:[EMAIL PROTECTED]
tel;work:031 333 10 20
tel;fax:031 333 10 23
tel;home:031 333 36 03
x-mozilla-html:FALSE
version:2.1
end:vcard
_______________________________________________
Zope-CMF maillist - [email protected]
http://mail.zope.org/mailman/listinfo/zope-cmf
See http://collector.zope.org/CMF for bug reports and feature requests