[Zope] Using "global" images in /root/subfolder

Stefan Hoffmeister Stefan.Hoffmeister@Econos.de
Thu, 21 Oct 1999 15:56:10 +0200


: On Wed, 20 Oct 1999 11:03:15 +1000 (EST), Stuart 'Zen' Bishop wrote:

>DTML methods require passing of 'self' to them, unlike methods in just
>about every other OO environment. 

OK, so this is what I mixed up. 

The problem is that the documentation does NOT make it clear that DTML
Methods are fundamentally different from DTML documents in this respect,
that they are, in effect, Python methods.

I was assuming that the DTML Method would be inheriting this() and REQUEST
(and everything else) from the "surrounding" namespace ("acquire from the
outermost scope[s]" in Zope speak?)

>if it is worth tidying up the syntax at the expense of breaking
>pathalogical (IMHO) cases :-)

If the docs were fixed I wouldn't have run into this :-)

>Of course, I probably wouldn't call these cases pathalogical if I had
>written any myself :-)

Well, I am not terribly familiar yet with the design philosophy of Zope,
but as far as I can tell, acquisition means content inheritance from all
outermost scopes combined - and it might be worth-while to have translate
this into DTML Method calls via *Python syntax*, too. 

On the other hand, there appears to be no way to discriminate between DTML
method calls and External Method calls... Hmmm. One paragraph in the docs
should solve this problem cleanly and consistency for all method calls -
and keep the current, rather elaborate syntax - consistent across calls.