Re: [Zope] Using Z Classes...
-----Original Message----- From: Donald Holten <donner@biophysics.lanl.gov> To: zope@zope.org <zope@zope.org> Date: Wednesday, August 18, 1999 4:35 PM Subject: [Zope] Using Z Classes...
Hi! I've created a Z Class named ZCounter with the following methods: GetCount InitCounter SetExclude
It has the usuall add and factory stuff too.
I've checked out the documentation, and they say how to make a Z Class object, but how do I use one? They didn't seem to have any examples. How, for instance, would I use the method GetCount that is in the ZCounter? Thanks!
The ZClass methods are methods that are available to any instance of the ZClass. To use the methods, you need to first add an instance. So, in the management interface for your Zope root, you select "ZCounter" from the add list, and assign it an id (eg "test").
From the web, you could call the GetCount method of test like so: http://your.site/test/GetCount
From DTML, you could call it like this: <dtml-with test> <dtml-call GetCount> </dtml-with>
or <dtml-call "test.GetCount()"> (Warning: I did not specifically test the above... I'm just going on what I've done with my ZClasses) Kevin
participants (1)
-
Kevin Dangoor