[Zope] ZClass

Loren Stafford lstafford@icompression.com
Tue, 2 Nov 1999 08:22:28 -0800


I had the same problem. See thread 'Can't add "date" property to new ZClass'
from 1999-10-11.

Here is Michel's response:

"""
[Zope] should be a little smarter than that.  In fact, it should be
smarter for instances also and just assume a sane value (like calling
DateTime() with no arguments, which returns 'now').

Please submit to the Collector.  Should be a pretty trivial fix if you
want to take a hack at it and submit a patch, just sniff for a null
value and insert DateTime() instead of DateTime(formvalue).

-Michel
"""

I didn't patch it; I submitted to Collector.

-- Loren


> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Tom
> Deprez
> Sent: Tuesday, November 02, 1999 05:08
> To: zope@zope.org
> Subject: [Zope] ZClass
>
>
> Hi,
>
> Just a little question:
>
> Yesterday, I was working with ZClasses. While making one of my own, I saw
> that Zope asked for a value to enter per property.
>
> Why does Zope asks for a value to enter for a new property when you're
> making a class? I understand that you've to enter a value when you're
> making a Class instance? But while defining a class??? Is this meant as a
> default value??
>
> This is particulary strange when working with a propery as date.
> What to do, if you don't want to give a default value? Zope always
> complains that you have to give a value.
>
> Please, help to clear my mind
>
> Tom.
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
>
> (Related lists - please, no cross posts or HTML encoding!
>
> To receive general Zope announcements, see:
> http://lists.zope.org/mailman/listinfo/zope-announce
>
> For developer-specific issues, zope-dev@zope.org -
> http://lists.zope.org/mailman/listinfo/zope-dev )
>