At 18:57 14/05/99 , Tom Deprez wrote:
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-->
You have to call manage_editProperties on the propertysheet that contains the property. Use propertysheets.[name-of-template].manage_editProperties(hit=Count=hitCount+1) -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-6254545 Fax: +31-35-6254555 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------