On 4 Aug 2000, at 22:10, Dieter Maurer wrote:

> Brad Clements writes:
>  > However first-eventday is ALWAYS true, however when I print &dtml-
>  > eventday; the output value is always the same for each row, so first-
>  > >
>  eventday shouldn't be true on any row except the first.
> Almost surely, the "in" tag does not call a callable object
> (because it does not expect, they could be callable).
> You, therefore, get the method itself.
> It is identical for all records.

So true, the solution is to define an __init__ class in the brain class,
then use that to populate "self".

class   PackageEvent:
    """Package Event Pluggable Brain"""
    def __init__(self):
        self.__dict__['eday'] = self.eventday()

    def eventday(self):

Now 'first-eday' works.

Brad Clements,                [EMAIL PROTECTED]   (315)268-1000
http://www.murkworks.com                          (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com               AOL-IM: BKClements

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to