[Zope] (my) faulty ZClass constructor

Dieter Maurer dieter@handshake.de
Tue, 22 Aug 2000 23:57:16 +0200 (CEST)


Jean Jordaan writes:
 > .... further testing shows that this works::
 > 
 >     <dtml-call "RESPONSE.redirect(
 >        DestinationURL()+'/manage_workspace')">
 > 
 > but this::
 > 
 >   <dtml-if DestinationURL>
 >     <dtml-call "RESPONSE.redirect(
 >        DestinationURL()+'/manage_workspace')">
 >   </dtml-if>
 > 
 > generates a::
 > 
 >   Error Type: TypeError
 >   Error Value: call of non-function (type string)

I am not sure, but in the DTML User Guide I read
that "dtml-if" is caching its variable (to save time,
in case the variable is a costly method call).

I would expect, it works as follows:

  like any DTML tag, "dtml-if" calls its name parameter
  (if it is callable). I expect that the result of this
  call is bound to the variable name.

  This means, "DestinationURL" which formerly was bound to
  a method, is now bound to the result of calling this
  method, i.e. to a string.



Dieter