9 Oct
2002
9 Oct
'02
4:47 p.m.
there are __getitem__() and get_value() methods for formulator fields. I'd like to experiment with __setitem__ and set_value(). The error message from my naive implementation in field.py is as follows: security.declareProtected('Access contents information', '__setitem__') def __setitem__(self, key, value): self[key] = value self._p_set_changed(1) return value
app.Formulator.myForm.stringfield1.__setitem__('required',1) Traceback (most recent call last): File "<interactive input>", line 1, in ? AttributeError: __setitem__
Does anyone know what I need to do to add __setitem__ (and later on, set_value()) to formulator fields? Thanks.