[Zope] Faulty default ZClass constructor method?

Jean Jordaan Jean@mosaicsoftware.com
Tue, 22 Aug 2000 14:46:39 +0200


Hi all

If I add a product from ' /Control_Panel / Products ', and
then add a ZClass in there with 'Create constructor objects'
checked, I end up with a ' /Control_Panel / Products / ccTest 
/ testClass_add ' method containing::

  <dtml-if DestinationURL>

    <dtml-call "RESPONSE.redirect(
       DestinationURL+'/manage_workspace')">

  <dtml-else>

    <dtml-call "RESPONSE.redirect(
           URL2+'/manage_workspace')">
  </dtml-if>

This generates::

  Error Type: TypeError
  Error Value: bad operand type(s) for +

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

Adding a () to the DestinationURL above made it work::

    <dtml-call "RESPONSE.redirect(
       DestinationURL()+'/manage_workspace')">

Shouldn't this be fixed somewhere?

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