On Wed, 20 Oct 1999, Stefan Hoffmeister wrote:
<dtml-var "globalImage(img='mail_png')">
does not work, although this works (thanks!):
<dtml-var "globalImage(this(),REQUEST,img='mail_png')">
Given that the content of the globalImage DTML Document is just
<dtml-with "images"> <dtml-var "_.getitem(img)"> </dtml-with>
why would "globalImage(img='mail_png')" [which is "nice + friendly"] fail with an "access denied to images" error?
I am trying to figure out how to reduce redundancy with the help of acquisition techniques. And in my book "this(),REQUEST," is sort of redundant, albeit apparently necessary, information that has to be "created" and "maintained" - and exactly what I do want to get rid of.
DTML methods require passing of 'self' to them, unlike methods in just about every other OO environment. <dtml-var globalImage> seems to be identical to <dtml-var "globalImage(this(),REQUEST)">. However, if you use the "" form, the 'self' and 'REQUEST' arguments don't default to anything sensible, as in some pathalogical cases people seem to depend on testing this()==None. There was some discussion on zope-dev recently about this, but no 'official' comments on if it is worth tidying up the syntax at the expense of breaking pathalogical (IMHO) cases :-) Of course, I probably wouldn't call these cases pathalogical if I had written any myself :-) ___ // Zen (alias Stuart Bishop) Work: zen@cs.rmit.edu.au // E N Senior Systems Alchemist Play: zen@shangri-la.dropbear.id.au //__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen