[Zope-CMF] Error trying to add FTI

Jon Edwards jon@pcgs.freeserve.co.uk
Tue, 23 Apr 2002 10:08:00 +0100


Thanks Thomas,

I'd missed the extra brackets and comma in the FTI definition of the module
...and you are right about using the "+" as a separator in the init file -
I'd tried that and it had failed, but that was because of the other error.

Incidentally, I'd copied bits of the code from the Contacts module of the
"OnlinePIM" product. So that will need fixing too, if it hasn't already!

Thanks again!

Cheers, Jon

> -----Original Message-----
> From: Thomas Olsen [mailto:tol@tanghus.dk]
> Sent: 22 April 2002 22:25

> I've had a lot of problems with this too:
>
> in the module define you fti as a tuple of dictionaries:
>
> factory_type_information = ({
>            },)
>
> Then in __init__.py:
>
> utils.ContentInit(
>   'Medzope Content',
>   content_types = ( MedzopeFolder.MedzopeFolder
>                    ,MedzopeOrg.MedzopeOrg
>                    ,Contact.Contact),
>   permission = ADD_FOLDERS_PERMISSION,
>   extra_constructors = (MedzopeFolder.addMedzopeFolder
>                        ,MedzopeOrg.addMedzopeOrg
>                        ,Contact.addContact),
>   fti=(MedzopeFolder.factory_type_information
>      + MedzopeOrg.factory_type_information
>      + Contact.factory_type_information)
>   ).initialize(context)
>
> Notice that you have to add the fti's with a '+' sign.