[Zope-dev] Fwd: Fwd: ZClassEvents

Tim McLaughlin tmclaughlin@visto.com
Thu, 24 May 2001 05:29:42 -0700


Great to see you've got it working!


-----Original Message-----
From:    Magnus Heino magnus.heino@rivermen.se
Sent:    Wed, 23 May 2001 22:44:22 +0100
To:      tmclaughlin@visto.com
Subject: Re: Fwd: ZClassEvents


-------------------
> Magnus,
> Did you get this working?

Yes. Sorry that you didnt get any response. I have successfully used
it in two projects.

I'll write an howto on monday and put up on zope.org

Thanks for a great product and great support!

/Magnus

>=20
> Tim
>=20
> -----Original Message-----
> From:    Tim McLaughlin tmclaughlin@visto.com
> Sent:    Fri, 18 May 2001 13:50:06 -0700
> To:      magnus.heino@rivermen.se
> CC:      zope-dev@zope.org
> Subject: Re: ZClassEvents
>=20
>=20
> Sorry Magnus,=20
>=20
> the self param is supposed to be bound in (Zope) python scripts.  So
there are actually only the last three (propertysheet_id, changes,
REQUEST) and self is actually the container in a ZClass.  I usually
rebind the container to a variable named self (in a ZClass) just to
make Python scripts a little more like Python.
>=20
> So in short, get rid of the self parameter as a parameter.  It is
actually the container.  An external method however, would still
require the self param.  Sorry for any confusion.
>=20
> If you get the hang of ZClassEvents can you write up a Howto?  If
not, I'll do one later.
>=20
> Cheers,
> --Tim McLaughlin
>=20
>=20
>=20
> -----Original Message-----
> From:    Magnus Heino (Rivermen) magnus.heino@rivermen.se
> Sent:    Fri, 18 May 2001 08:35:21 +0200
> To:      tmclaughlin@visto.com
> Subject: ZClassEvents
>=20
>=20
>=20
> Hi Tim,
>=20
> I just tried your ZClassEvents and ran into some problems.
>=20
> I installed it, added a python script like this to an exisitng
ZClass;
>=20
> onPropertyChange(self, propertysheet_id, changes, REQUEST)
>=20
>   self.reindex_all()
>=20
> but when I edit the properties of this zclass instance, I get an
error that
> only 3 parameters were passed, not 4 as expected.
>=20
> I then tried to remove self, and used context.reindex_all, but then
I got an
> error on aq_base
>=20
> How should it be used?
>=20
> Thanks!
>=20
> /Magnus
>=20
>=20
>=20
>
______________________________________________________________________
_____
> Visit http://www.visto.com/info, your free web-based communications
center.
> Visto.com. Life on the Dot.
>=20
>=20
>=20
>
______________________________________________________________________
_____
> Visit http://www.visto.com/info, your free web-based communications
center.
> Visto.com. Life on the Dot.
>=20
--

/Magnus Heino



_________________________________________________________________________=
__
Visit http://www.visto.com/info, your free web-based communications cente=
r.
Visto.com. Life on the Dot.