<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">dear Andreas</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">make my question short.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">I have a string object 'name'&nbsp;and it&nbsp;is&nbsp;a name of an exsiting&nbsp;folder</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">is there a method that&nbsp;uses&nbsp;'name'(a str object) as an argument&nbsp;to call upon this folder? </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Andreas Jung &lt;lists@zopyx.com&gt;<BR>To: Allen Huang &lt;swapp0@yahoo.com&gt;; Zope &lt;zope@zope.org&gt;<BR>Sent: Saturday, January 6, 2007 10:20:16 PM<BR>Subject: Re: [Zope] saving/creating an object to an exsisting folderish object<BR><BR>
<DIV>--On 6. Januar 2007 06:17:40 -0800 Allen Huang &lt;swapp0@yahoo.com&gt; wrote:<BR><BR>&gt; This is a problem a got a lot and I never able to seem to solve it.<BR>&gt; I want save or create a object to a specific folder or other folderish<BR>&gt; object,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I ask the user for the id of that folder or folderish<BR>&gt; object&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I store the id name in a variable 'name'<BR>&gt;<BR>&gt; the problem is I know the type of the folder or folderish object but<BR>&gt; 'name' is a str object and I can't use command like name.manage_addFile().<BR>&gt; The server just tells me that name is a str which contains no function<BR>&gt; manage_addFile().<BR>&gt;<BR>&gt; I always end up doing a<BR>&gt; &lt;dtml-in "objectValues(['Folder'])"&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dtml-if "getId() ==
 name"&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; do something....<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dtml-if&gt;<BR>&gt; &lt;/dtml-in&gt;<BR>&gt;<BR>&gt;<BR><BR>Please take the advice and learn Python. Such logic should be implemented<BR>in Python and *not* in DTML. DTML/ZPT are for presentation *only*, not for<BR>implementing business logic.<BR><BR>-aj</DIV></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR></DIV></div><br>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com </body></html>