Why does this work

<dtml-call "_['testadd'].manage_addDTMLMethod('MethodId', 'Method
Title','method text')">

While this does not:

<dtml-call "_['testadd'].manage_addZSQLMethod('ZSQLID', 'ZSQL Title',
'DB','','select * from data')">

Error Type: AttributeError
             Error Value: manage_addZSQLMethod

I studies the Znolk product and found that it uses _setObject directly
instead of 
manage_addZSQLMethod .

I was able to overcome it by defining an  one-line external method:

from  Products.ZSQLMethods.SQL import *

def manage_addZSQLMethod(self, sqlId, sqlTitle, connection_id, args, command):
    self._setObject(sqlId, SQL(sqlId, sqlTitle, connection_id, args, command)) 

but it IMHO the visibility of manage_addDTMLMethod and manage_addZSQLMethod 
_should_ be the same ?


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

Reply via email to