RE: [Zope] Simple question (again)
-----Original Message----- From: Michael Bernstein [mailto:mbernstein@profitscape.net] Sent: Tuesday, August 24, 1999 2:08 PM To: Evan Simpson Cc: Arnaud Lecat; ZOPE Subject: Re: [Zope] Simple question (again)
Evan Simpson wrote:
When you say 'document', do you really mean 'DTML Method'?
In a DTML
*Document*, 'id' and 'title' refer to the document itself, while in a *Method* they refer to the client/caller/container (grr).
You can use 'document_id' and 'document_title' to get what you want in both cases.
If these work for both DTML Methods and DTML documents, does that mean that 'id' and 'title_or_id' are going to be deprecated?
'document_id' and 'document_title' work only for DTML Methods. They are legacy attributes, from the days before DTML Documents; they are hacks. The problem here is not one of 'how do i get the id of a method' really, the question should be, '*why* would I *want* to get the id of a method'. if you want your DTML object to be able to see it's own properties, including it's id and title, then use a DTML Document. If you want to get the id or title of a Method, then you might be doing something wrong. Of course, I could be convinced otherwise. In fact I don't think method's should even have titles; but that will probably never go away because of backwards compatablility issues. -Michel
Michael Bernstein.
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
As of Zope 2.0b4, at least, 'document_id' and 'document_title' are valid for both Documents and Methods. Apart from that detail, I quite agree. I have found Method titles to be mildly useful as a sort of brief description of the method, though. ----- Original Message ----- From: Michel Pelletier <michel@digicool.com>
'document_id' and 'document_title' work only for DTML Methods. They are legacy attributes, from the days before DTML Documents; they are hacks.
The problem here is not one of 'how do i get the id of a method' really, the question should be, '*why* would I *want* to get the id of a method'. if you want your DTML object to be able to see it's own properties, including it's id and title, then use a DTML Document.
If you want to get the id or title of a Method, then you might be doing something wrong. Of course, I could be convinced otherwise. In fact I don't think method's should even have titles; but that will probably never go away because of backwards compatablility issues.
participants (2)
-
Evan Simpson -
Michel Pelletier