Subject: Re: [Zope] Many Zope questions
From: "Kevin Dangoor" <[email-masked]>
To: "John Goerzen" <[email-masked]>
Date: Fri, 3 Sep 1999 16:18:53 -0400

-----Original Message-----
From: John Goerzen <[email-masked]>
To: Kevin Dangoor <[email-masked]>
Cc: [email-masked] <[email-masked]>
Date: Friday, September 03, 1999 3:35 PM
Subject: Re: [Zope] Many Zope questions

>"Kevin Dangoor" <[email-masked]> writes:
>
>> Zope knows what types objects are. For example, if you do:
>> <dtml-var "someDateProperty + 5" fmt="%m/%d/%y">
>> you will get the date five days later than the date stored in the
property.
>>
>> Likewise, if you do:
>> <dtml-var "someDateProperty + 'foo'">
>> I believe you'll get an error. (not sure what adding a string to a date
>> would mean :)
>
>OK, I am confused.  Where did you find these %m/%d/%y things?  I am
>looking in Appendix A of the DTML guide and they aren't mentioned.

I think this is an undocumented feature...

>I am trying to do this:
>
><!--#var when fmt=DayOfWeek-->
>
>(substitute any other date thing for DayOfWeek)
>
>When I leave off fmt, the date is displayed, but it is ugly and with
>an unnecessary timezone, so I want to display it as I wish.  when,
>BTW, comes from a gadfly database.
>
>When I try to view this, though, I get:
>
>Error Type: TypeError
>Error Value: not all arguments converted
>
>What am I doing wrong?

I've never used gadfly. Everything I've been doing with Zope has been within
the ZODB. And I've been a happy camper...

>> This is a fine question. I often look at the source code when I'm curious
>> about something and can't find docs on that specific topic. The Zope
source
>> is very readable.
>
>Ahh.  Well, I don't know Python.  C, Perl, C++, etc., yes, but no
>Python.  I guess I ought to learn it, eh?

Take a look at the source, I think you'll be pleasantly surprised. If you
know C, Perl and C++, you'll probably be able to read the source just fine.

Probably the biggest thing you'll get by looking at parts of the source is a
completely accurate listing of exactly what methods an object has. This
doesn't really require knowing python. Just look for the "class" statements
and the "def" statements (which define methods).

Kevin