On Mon, 2006-02-13 at 16:31 +0100, Egon Frerich wrote:
> for a content component I have programmed a factory to be sure numeric
> fields have 0.0. If I add an object without numeric values the
> introspectors tells me these fields have type "NoneType" and the values
> are "None".
> Logging informations inform the factory is called and these fields
> contain 0.0.
> The datafields are instances of FieldProperty.
> What have I to do?
>From my recent experience, I think you should :
- define a default value for your properties in your content
myFloatProperty1 = Float (..., default=0.0)
myFloatProperty2 = Float (..., default=0.0)
- define the "set_before_add" value in your browser package
I think that this should do the job you're looking for.
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Zope3-users mailing list