Re: [Zope] (my) faulty ZClass constructor

2000-08-22 Thread Dieter Maurer

Jean Jordaan writes:
 >  further testing shows that this works::
 > 
 > DestinationURL()+'/manage_workspace')">
 > 
 > but this::
 > 
 >   
 > DestinationURL()+'/manage_workspace')">
 >   
 > 
 > 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

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] (my) faulty ZClass constructor

2000-08-22 Thread Jean Jordaan

Hi all

I realize it's probably going to turn out to be my mistake
all along .. anyway, further testing shows that this works::



but this::

  

  

generates a::

  Error Type: TypeError
  Error Value: call of non-function (type string)

with traceback ending::

  File C:\programs\ZopeDev\lib\python\DocumentTemplate\DT_Util.py, line 335,
in eval
(Object: RESPONSE.redirect(
 DestinationURL()+'/index_html'))
(Info: DestinationURL)
  File , line 0, in ?
  TypeError: (see above)

What difference does the  make to DestinationURL?

-- 
Jean Jordaan   --technical writer--
Mosaic Software--Zope 2.1.6 on WinNT and W2K

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )