-----Original Message----- From: Philip Aylesworth [mailto:phila@regalint.com] Sent: Wednesday, March 03, 1999 3:44 PM To: Zope List Subject: [Zope] DTML Method vs Document
I just upgraded to 1.10.2 and I noticed that when creating a new document I have a choice of DTML document and DTML method. This seems useful. I noticed that all my DTML documents and DTML methods have the icon for a DTML method. Everything seems to work.
What is the difference between a DTML document and a DTML method? Seems to me a method should not be surfable but they are.
This is my take on the situation. As far as I can tell this is pretty deep voodoo. A DTML Method is what used to be just a Document in pre 1.10 releases. DTML Methods are not objects, they are methods. If you have a folder called foo, and it contained a DTML Method called bar, then bar is a method of foo. foo doesn't contain the object bar, it has the method bar bound to it. What this means is that from bar's point of view, 'self' is a Folder object, and any properties it sees are properties of foo, not itself. DTML Documents are Zope Objects. Their idea of 'self' is themselves. They are contained in folders, but are not methods bound to that folder, they are instances of DTMLDocument.DTMLDocument. They can manage their own Properties (because they inherit PropertyManager.PropertyManager). Both DTML Documents and DTML Methods can hold DTML and content. The difference is subtle. DTML Methods would be used when the answer to the question 'Am I showing some other objects content through me?' is Yes. DTML Documents should be used when the answer to the question 'Am I the content I want to display?' is Yes. DTML Methods have the advantage that they don't have any properties, and their perspective of aquisition is from their containing folders point of view. DTML Documents have properties which may interfere with aquisition you'd want to do, and aquisition is from their own point of view, which may not be what you want. (BTW Martijn, perhaps the above should go in the FAQs) If this isn't clear to you don't worry, it isn't even really clear to me. There is no way, but there really should be a way to convert between the two because the roles for a DTML widget may change from Method to Document as your system evolves. This will probably be a feature in the next release. (This is the answer to the question 'Can I convert between DTML Meths and DTML Docs?' for the FAQs)
Is it possible to change my documents to DTML documents? Even just for housekeeping.
See directly above.
One other unrelated question: What is a Principia Draft?
Ugh..good question... I need to find that one out myself.
------------------------------------------------------------------- Philip Aylesworth Information Systems Manager phila@regalint.com PGP public key: http://www.regalint.com/PGPkeys/phila.html
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope