Where can I find a great explanation of the difference between DTML Methods and DTHL Documents? //johan carlsson torped johan carlsson birkagatan 9 113 36 stockholm telefon 08-32 31 23 mobil 070-558 25 24 fax 08-32 89 47 johanc@torped.se
"Johan Carlsson" wrote Where can I find a great explanation of the difference between DTML Methods and DTHL Documents?
Don't know if the ZDP (zdp.zope.org) has covered this yet, but the short answer is: Documents can have Properties. Methods cannot. This means, for instance, that on certain documents, you could set a property 'isFooTypeDocument', and check for that elsewhere in your system. With methods, the only method-specific properties are the id and title, available as 'document_id' and 'document_title'. Anthony
"Johan Carlsson" wrote Where can I find a great explanation of the difference between DTML Methods and DTHL Documents?
Don't know if the ZDP (zdp.zope.org) has covered this yet, but the short answer is:
Documents can have Properties. Methods cannot.
This means, for instance, that on certain documents, you could set a property 'isFooTypeDocument', and check for that elsewhere in your system. With methods, the only method-specific properties are the id and title, available as 'document_id' and 'document_title'.
I saw a earlier mail-tread that Method take arguments (obviously) can a document take arguments as well? What are the default arguments (not named) for Method and Documents. (I've just learned about method_name(PARENTS[-1],REQUEST) in the example for a SiteMap function) Best Regards, Johan Carlsson
On Tue, Apr 20, 1999 at 11:19:58AM +0200, Johan Carlsson wrote:
Where can I find a great explanation of the difference between DTML Methods and DTHL Documents?
A quick explanation is that DTML methods operate in the namespace of their containing object (generally a folder), whereas DTML documents create a new namespace level. This makes a BIG difference when you're trying to do certain things :-) For example, the method "objectValues", which I use a lot, will return the object values of the containing folder when used in a DTML method, but will return basically nothing when used in a document. This ia a bit confusing, but... Chris -- | Christopher Petrilli ``Television is bubble-gum for | petrilli@amber.org the mind.''-Frank Lloyd Wright
On Tue, Apr 20, 1999 at 11:19:58AM +0200, Johan Carlsson wrote:
Where can I find a great explanation of the difference between DTML Methods and DTHL Documents?
A quick explanation is that DTML methods operate in the namespace of their containing object (generally a folder), whereas DTML documents create a new namespace level. This makes a BIG difference when you're trying to do certain things :-) For example, the method "objectValues", which I use a lot, will return the object values of the containing folder when used in a DTML method, but will return basically nothing when used in a document.
This ia a bit confusing, but...
Only if you don't know how it works ;-) How can I see if its a MEthod och a Document? //johan
participants (4)
-
Anthony Baxter -
Christopher Petrilli -
Johan Carlsson -
Shaolin