[Zope] changing object properties

Ruberl Michele mruberl@etnoteam.it
Tue, 13 Mar 2001 19:45:46 +0100


Hi all,
I created my first ZClass: ok
Now I'd like to create a method for editing my class instances' properties,
just for not using propertysheets/MyProperties/manage which is not the
nicest to see.
Ok, I created a DTML method with the front-end which calls a Script (Python)
which should actually update the properties' values.
I tried two ways of writing such a script:


1.
context._updateProperty(name_property, value_from_form)

It gives me an "IOError" while saving script changes (I suppose because it
is an internal python method, it would works only if external, am I right?)

2.
context.name_property=value_from_form

It gives me an "Error Type: TypeError - Error Value: attribute-less object
(assign or del)" when executed
Now, probably it is a stupid Python question.. could you help me anyway?
(I'd prefer to stay with just internal ppython methods)

Thanks a lot

Michele