Andreas Pauley writes:
 > I need to pass some parameters to my external methods.
 > 
 > I have an external method that looks (somewhat) like this:
 > 
 > def extAccess(self, accttype_cde):
 >     return accttype_cde
 > 
 > ....
 >
 > <dtml-if "extAccess(accttype_cde='COM')">
 >   <b>The external method returned true</b>
 > </dtml-if>
 > 
 > I get the following error for the above statement:
 > Error Type: TypeError
 > Error Value: not enough arguments; expected 2, got 0

External methods try to be intelligent with respect
to parameter passing and sometimes they get it wrong.

You may explicitly pass all parameters:

  <dtml-if "extAccess(this(),'COM')">
    ....

This should work.


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 )

Reply via email to