[Zope] KeyError when HTMLFile returned from subobject of main instance
Tim Hicks
tim@sitefusion.co.uk
Tue, 2 Jul 2002 12:19:45 +0100
This is a multi-part message in MIME format.
------=_NextPart_000_007E_01C221C2.C0427CB0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I have a product that takes various 'plugins' to actually provide the =
functionality for the system. Essentially, the main class provides an =
API (along with various management methods and forms) that the plugins =
actually implement. I've based it on exUserFolder code.
I want to have TTW configuration of each plugin, which will necessarily =
be different for each one. To do so, I defined a method of the main =
class:=20
def manage_editConverterForm(self, REQUEST):
""" """
return self.currentConverter.manage_editConverterForm(self, REQUEST)
The problem is, I get 'KeyError' raised when zope reaches <dtml-var =
manage_tabs> in the HTMLFile ('manage_editForm') defined in the =
currentConverter object. I presume it's because I'm not passing in the =
correct arguments, but I don't know what they should be if not what I've =
got.
Anyone with enlightenment?
tim
------=_NextPart_000_007E_01C221C2.C0427CB0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2715.400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I have a product that takes various =
'plugins' to=20
actually provide the functionality for the system. Essentially, =
the main=20
class provides an API (along with various management methods and =
forms)=20
that the plugins actually implement. I've based it on exUserFolder =
code.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I want to have TTW configuration of =
each plugin,=20
which will necessarily be different for each one. To do so, I =
defined a=20
method of the main class: </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>def manage_editConverterForm(self,=20
REQUEST):</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> """ """</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> return=20
self.currentConverter.manage_editConverterForm(self, =
REQUEST)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The problem is, I get 'KeyError' raised =
when zope=20
reaches <dtml-var manage_tabs> in the HTMLFile ('manage_editForm') =
defined=20
in the currentConverter object. I presume it's because I'm not =
passing in=20
the correct arguments, but I don't know what they should be if not what =
I've=20
got.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Anyone with enlightenment?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>tim</FONT></DIV></BODY></HTML>
------=_NextPart_000_007E_01C221C2.C0427CB0--