[Zope-CMF] Re: using GenericSetup to add non-content objects

Rob Miller ra at burningman.com
Wed Mar 1 01:46:58 EST 2006


On Thu, 23 Feb 2006 06:59:33 -0500, Tres Seaver wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> yuppie wrote:
>> RAM and HTTP cache managers just require the object id as argument. +1
>> for fixing this id issue in the toolset handler.
>> 
>> But everything else like titles are properties of the tool itself that
>> have nothing to do with the container and might need tool-specific setup
>> code. Allowing to set arbitrary arguments in 'toolset.xml' violates the
>> current structure of the profiles. So -1 for supporting other arguments
>> than id.
> 
> Agreed.  I think there is support for an optional tool ID lying around
> somewhere in there;  maybe I dropped it on the floor?

okay, finally got around to fixing this.  did it very simply... if tool
creation fails w/ a TypeError, then try again passing the id in to the
constructor.
 
> As a workaround for tools which require extra arguments, but for which
> several possible "stock" configurations are possible, one could register
> a factory other than the class itself (this won't scale against large
> numbers of arguments or possible values, obviously).

right, but it's a nice quick hack.  thanks.

-r




More information about the Zope-CMF mailing list