[Zope] zope product making: attribute error, value=globals
bak (kedai)
kedai@kedai.com.my
Fri, 28 Sep 2001 01:42:25 +0800
hi all
i'm making a product that subclass DTMLD ocument. i can add the product,
view all tabs in zmi (security, edit, proxy, etc), but i can't view the
product instance.
attached is the error and traceback, and snippets of the code.
what am i missing?
thanks
---
Error Type: AttributeError
Error Value: globals
Traceback (innermost last):
File /home/kdie/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py, line 223,
in publish_module
File /home/kdie/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py, line 187,
in publish
File /home/kdie/Zope-2.4.1-src/lib/python/Zope/__init__.py, line 226, in
zpublisher_exception_hook
(Object: LockableItem)
File /home/kdie/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py, line 171,
in publish
File /home/kdie/Zope-2.4.1-src/lib/python/ZPublisher/mapply.py, line 160,
in mapply
(Object: ElementWithAttributes)
File /home/kdie/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py, line 112,
in call_object
(Object: ElementWithAttributes)
File /home/kdie/Zope-2.4.1-src/lib/python/OFS/DTMLDocument.py, line 199, in
__call__
(Object: ElementWithAttributes)
File /home/kdie/Zope-2.4.1-src/lib/python/DocumentTemplate/DT_String.py,
line 494, in __call__
(Object: ElementWithAttributes)
AttributeError: (see above)
----
def_file = """temporary only"""
def manage_addTextAreaEditor(self, id, title='',REQUEST=None):
"""the add method"""
ob = TextAreaEditor(id, title)
self._setObject(id,ob)
ob = getattr(self,id)
ob._postinit(default)
class myclass(DTMLDOcument):
<snips stuff>
def __init__(self, id, title=''):^M
"""my init"""^M
self.id = id^M
self.title = title^M
def _postinit(self,def_file):
"""postinit"""
self.manage_edit(data=def_file,title='')