Am Sonntag, den 13.11.2005, 16:13 +0100 schrieb Florent Guillaume: > Tino Wildenhain wrote: > >>I've found quite a lot of doc about the Zope built-in-functions. But > >>very often I miss information about the args that can be passed to > >>the functions, e.g. "manage_changeProperties". You find a description > >>of the function, an example passing REQUEST, but I had to guess that > >>you can pass a map as well. > >> > >>Any help? Am I blind or stupid? Probably both :) > > > > > > The quickest way - ideally you use ZEO for storage > > and have a client running for your web access, > > use another client instance like this: > > > > --- interactive example ----- > > > > ./bin/zopectl debug > > Starting debugger (the name "app" is bound to the top-level Zope object) > > > >>>>help(app.manage_changeProperties) > > > > Help on function manage_changeProperties in module OFS.PropertyManager: > > > > manage_changeProperties(self, REQUEST=None, **kw) > > Change existing object properties. > > > > Change object properties by passing either a mapping object > > of name:value pairs {'foo':6} or passing name=value parameters > > > > --- end interactive example ---- > > > > > > while app is your zope-root and you can reach any > > object via dotted notation and just try things > > out before you write code. > > Well, except that in this case the docstring for manage_changeProperties > is badly wrong, if you pass a mapping as first argument, it will think > it's a request and render a page you'll never use as a result, which > slows it down a lot. > > The proper way to call manage_changeProperties is: > manage_changeProperties(foo=6, bar='blah') > or > manage_changeProperties(**somemapping) > > > I've been meaning to fix Zope for years but... >
Well, these are easy fixes either in the docs (or docstrings) or in the API. Maybe if filed as bug some starter might pick them up on next bugday? --Tino _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )