[Zope] changing the meta_type for python product class

Dragos Chirila objectvalues at gmail.com
Wed Dec 6 13:53:36 EST 2006


Hi!

Thank you very much for your response.

Ok, you are right, but if I do it why the ZMI is showing to me the new
meta type for both instances? This is wrong...

Also, I don't understand why if I explicit change the meta_type
property for the old instance (e.g. a method of MyClass that is called
via URL) still nothing happens?

I also tried to add the following lines to the MyClass:

    _properties = (
        Folder._properties
        +
        (
            {'id': 'meta_type', 'type': 'string', 'mode': 'w'},
        )
    )

In the Properties tab for both instances the same value is shown for
the meta_type property.

Thank you very much once again for taking time to consider my problem.

Regards,
Dragos.

On 12/6/06, Dieter Maurer <dieter at handshake.de> wrote:
> Dragos Chirila wrote at 2006-12-6 15:48 +0200:
> > ...
> >What I am trying to accomplish is to be able to change the meta_type
> >value and this to work (e.g. with no effect on python scripts like
> >'listing')
>
> The best way is *NOT* to change the meta type (at least not when
> you have places that require it unchanged).
>
> Instead derive a new class from it and give this new class a new
> meta_type.
>
>
>
> --
> Dieter
>


More information about the Zope mailing list