[Zope] test with ZClasses

Tom Deprez Tom Deprez" <tom.deprez@village.uunet.be
Fri, 14 May 1999 18:57:41 +0200


Hi,

I was trying to make a hitcounter ZClass (cHitCounter). But I've got
problems with it. The ZClass has one property (hitCount : int)

Calling the property is no problem. But I can't seem to increment it!
Nothing works (and I tried a lot!) :

1. I made an 'inc' DTML method in the product pHitCounter, which only
contains this line  :

<!--#call "manage_changeProperties(hitCount=hitCount+1)"-->

If I now make an instance of this class and from a dtml document call :

<!--#with counter-->
<!--#call inc-->
<!--#var hitCount-->
<!--#/with-->

Going to this page doesn't increments the hitCount at all!

2. Also this doesn't work either :

<!--#with counter-->
<!--#call "manage_changeProperties(hitCount=hitCount+1)"-->
<!--#var hitCount-->
<!--#/with-->

I tried several things, like changing the url, but or I get an error
relating the site is down, or I get no error at all, but also no increment!

What am I doing wrong???

---

can also somebody tell me, why I get an error using : <!--#var
counter.hitCount--> and not when using

<!--#with counter-->
<!--#var hitCount-->
<!--#/with-->


Tom.