Hi Roger,

>> Btw., it is possible to have a three-state widget for 
>> booleans, such as a drop-down widget, that includes 
>> "True/False/None", although it may not make much sense.
> No that's not possible! Because you can't save anything 
> then False or True in a Bool field.

Really? How is this different to having a not-required Int, Float, 
TextLine or whatever field, with no default? Do they then semantically 
default to 0, 0.0, "" etc, or are they expected to be None? My 
assumption is that they're None when not explicitly set.

> I think it's always bad idea to use default=None for Bool
> fields. Because of it's invalid defaults.

I guess that depends on whether you think "not set" means "invalid". In 
SQL, for example, any field type can accept NULL (unless the column is 
defined NOT NULL).

Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book

Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to