Re: [Zope-CMF] Re: GenericSetup and Zope 2.8.5

2006-03-27 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

robert rottermann wrote:
> 
>> You need to register the IBody adapter for your content object.  For
>> example, see the GenericSetup/PythonScripts/configure.zcml, which has:
>>
>>  > xmlns="http://namespaces.zope.org/zope";
>> xmlns:five="http://namespaces.zope.org/five";
>> >
>>
>>   >   factory=".exportimport.PythonScriptBodyAdapter"
>>   provides="Products.GenericSetup.interfaces.IBody"
>>   for=".interfaces.IPythonScript
>>Products.GenericSetup.interfaces.ISetupEnviron"
>>   />
>>
>>...
>>
>> Tres.
>> - --
>>   
> 
> thanks a lot
> I see I have to dig into Five first.
> 
> How does Five know, that it should read my config file ?
> 
> robert

- From the "manual.txt for Five 1.0",
http://svn.zope.org/Products.Five/branches/1.0/doc/manual.txt?rev=65463&view=auto

  Five will automatically pickup ``configure.zcml`` when it's placed in
  the product's directory.  Any object that provides ``IMyInterface`
  can now be adapted to ``INewInterface``, like this::


You can also do the equivalent adapter registrations in Python.

Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEJ8/Q+gerLs4ltQ4RAisYAKC/MxzoUNDwWifCAieHAQk8uqx8pwCgjjCv
wy4rPVK7c3aldpLXxrzwphk=
=ZL2D
-END PGP SIGNATURE-
___
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


Re: [Zope-CMF] Re: GenericSetup and Zope 2.8.5

2006-03-26 Thread robert rottermann



You need to register the IBody adapter for your content object.  For
example, see the GenericSetup/PythonScripts/configure.zcml, which has:

 http://namespaces.zope.org/zope";
xmlns:five="http://namespaces.zope.org/five";
>

  

   ...

Tres.
- --
  

thanks a lot
I see I have to dig into Five first.

How does Five know, that it should read my config file ?

robert
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  -  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 and Zope 2.8.5

2006-03-26 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

robert rottermann wrote:
> 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)
> 

You need to register the IBody adapter for your content object.  For
example, see the GenericSetup/PythonScripts/configure.zcml, which has:

 http://namespaces.zope.org/zope";
xmlns:five="http://namespaces.zope.org/five";
>

  

   ...

Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEJugh+gerLs4ltQ4RAsDlAKCFm2OYpD64cBm8ME93i9LiijFdaACgn3Cw
syxnyyMr4bRCBNP4hC7Pjss=
=G/Q+
-END PGP SIGNATURE-

___
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