Re: [Zope] ZClass Virgin
-----Original Message----- From: Robin Becker <robin@jessikat.demon.co.uk> To: zope@zope.org <zope@zope.org> Date: Saturday, August 28, 1999 12:45 PM Subject: [Zope] ZClass Virgin
What's the preferred way to change a property. Eg say I have a property count and I want to increment this each time the object is viewed. I've tried various constructs like <dtml-call count="count+1"> ....</dtml-let>, but the count always goes back to the original value.
This should do it: <dtml-call "propertysheets.YourPropSheet.manage_changeProperties({'count' : count+1})"> Keeping in mind of course that you still have that ages old "this creates a transaction each time the method is hit" issue that's come up with the previous counter products... Kevin
In article <004201bef175$d45a2de0$7b5addc7@laptop>, Kevin Dangoor <kid@kendermedia.com> writes
-----Original Message----- From: Robin Becker <robin@jessikat.demon.co.uk> To: zope@zope.org <zope@zope.org> Date: Saturday, August 28, 1999 12:45 PM Subject: [Zope] ZClass Virgin
What's the preferred way to change a property. Eg say I have a property count and I want to increment this each time the object is viewed. I've tried various constructs like <dtml-call count="count+1"> ....</dtml-let>, but the count always goes back to the original value.
This should do it: <dtml-call "propertysheets.YourPropSheet.manage_changeProperties({'count' : count+1})">
Keeping in mind of course that you still have that ages old "this creates a transaction each time the method is hit" issue that's come up with the previous counter products...
Kevin
apparently this might not happen if we use _v_ type names as Stephan Richter says A few weeks back I posted the same question. See the archives. :) you need to write some external methods. The variable you use for the counter should start with _v_ which gives it protected status. But you can call this attr only with a python function. have fun, stephan -- Stephan Richter -- Robin Becker
participants (2)
-
Kevin Dangoor -
Robin Becker