[Zope] Variable substitution in an object name

Lou Scalpati lou@hi-privacy.net
Thu, 14 Jun 2001 15:48:34 -0700


This is a multi-part message in MIME format.

------=_NextPart_000_017D_01C0F4E9.78000B40
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I can substitute a property name for the base of an object call with:

<dtml-var expr=3D"_[wrap].index_html(_.None,_)">
    where wrap is a property that refers the name of an object

But I have not been able to figure out how to use a variable to =
substitute the method (in this case index_html but could be index_xml or =
index_wap)=20

If I use the above methodology - I get looping login boxes where it =
won't authenticate and when I hit cancel I get a traceback in file =
DT_Util.py line 142, in careful_getattr.=20

Is there a way to do this??

Thanks

Lou

------=_NextPart_000_017D_01C0F4E9.78000B40
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 content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I can substitute a property name for =
the base of an=20
object call with:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>&lt;dtml-var=20
expr=3D"_[wrap].index_html(_.None,_)"&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; where wrap is a =
property that=20
refers the name of an object</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>But I have not been able to figure out =
how to use a=20
variable to substitute the method (in this case index_html but could be=20
index_xml or index_wap)&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>If I use the above methodology - I get =
looping=20
login boxes where it won't authenticate and when I hit cancel I get a =
traceback=20
in file DT_Util.py line 142, in careful_getattr. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Is there a way to do =
this??</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>Lou</DIV></FONT></FONT></DIV></BODY></HTML>

------=_NextPart_000_017D_01C0F4E9.78000B40--