[Zope-dev] why is manage_addZSQLMethod unavailable ?
Hannu Krosing
hannu@tm.ee
Fri, 18 Aug 2000 13:11:09 +0300
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 ?
-------------
Hannu