<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:10pt"><DIV style="FONT-SIZE: 10pt; FONT-FAMILY: times new roman, new york, times, serif">
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: times new roman, new york, times, serif">Hi. </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: times new roman, new york, times, serif">I found out what my problem is.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: times new roman, new york, times, serif">in my code I please baseclass&nbsp;Item&nbsp;before Folder</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;<FONT color=#4040ff>class ShpProjectClass(Item, Folder, Persistent, Implicit, CatalogAware):</FONT></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: times new roman, new york, times, serif">when I change the order, it worked normally</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;<FONT color=#4040ff>class ShpProjectClass(Folder, Item, Persistent, Implicit, CatalogAware):</FONT></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: times new roman, new york, times, serif">but I don't understand why? could someone explain this to me?<BR><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Allen Huang &lt;swapp0@yahoo.com&gt;<BR>To: Zope &lt;zope@zope.org&gt;<BR>Sent: Monday, March 12, 2007 10:31:27 AM<BR>Subject: Re: [Zope] have problem with managing objects within a external product<BR><BR>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif">
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT size=3>Dear AJ, </FONT></DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT size=3></FONT>&nbsp;</DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif">Thanks, but I still have some problems with creating a Folderish Object product</DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif">I imported Folder from&nbsp;OFS.Folder&nbsp;but I wasn't able to add any products like File, Folder, Image with in my folderish object.</DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif">my code looks like this--&gt;</DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT color=#4040ff><FONT size=2>class ShpProjectClass(Item, Folder, Persistent, Implicit, CatalogAware):<BR>&nbsp;&nbsp;&nbsp; id = 'ShpProject'<BR>&nbsp;&nbsp;&nbsp; meta_type = 'ShpProject'<BR>&nbsp;&nbsp;&nbsp; manage_options = (<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {'label':'Contents', 'action':'manage_main'},<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {'label':'Properties', 'action':'manage_editShpProjectForm'},<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {'label':'View', 'action':'index_html'},<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) + Item.manage_options<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; def __init__(self, id, projectDesc = 'Test Project'):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; """ Initialize a ShpProject Object """<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.id = id<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.projectDesc =
 projectDe</FONT><FONT size=2>sc</FONT></FONT></DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT color=#4040ff size=2></FONT>&nbsp;</DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT color=#4040ff size=2>&nbsp;&nbsp;&nbsp; def getProjectInfo(self):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; """ print a ShpProject Object Info """<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 'This project is called: ' + self.id + '. This project is about ' + self.projectName + '.'</FONT></DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT color=#4040ff size=2></FONT>&nbsp;</DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT color=#4040ff size=2>&nbsp;&nbsp;&nbsp; def edit(self, projectDesc, REQUEST=None):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; """ edit a ShpProject Object """<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.projectDesc = projectDesc<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if REQUEST is not None:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return self.index_html(self, REQUEST)</FONT></DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT color=#4040ff size=2></FONT>&nbsp;</DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT color=#4040ff size=2>&nbsp;&nbsp;&nbsp; ##Web Methods<BR>&nbsp;&nbsp;&nbsp; index_html = HTMLFile('DTML/index_html', globals())<BR>&nbsp;&nbsp;&nbsp; manage_editShpProjectForm = HTMLFile('DTML/manage_editShpProjectForm', globals())</FONT></DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT color=#4040ff size=2></FONT>&nbsp;</DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT color=#4040ff size=2>InitializeClass(ShpProjectClass)</FONT><BR><BR>what else am I missing? and is using ObjectManager&nbsp;unsave in anyway?</DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 14pt; 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: Friday, March 9, 2007 4:05:16 PM<BR>Subject: Re: [Zope] have problem with managing objects within a external product<BR><BR>
<DIV>--On 9. März 2007 00:01:50 -0800 Allen Huang &lt;swapp0@yahoo.com&gt; wrote:<BR><BR>&gt; I made a simple product using python that stores some varibles, but I<BR>&gt; couldn't make it acts like a folderish, stores objects, and have a<BR>&gt; content tab page using manage_main like when I use to have when I use<BR>&gt; internal product.<BR>&gt;<BR>&gt; I reviewed the tutorials on how to make internal products and I found the<BR>&gt; base class modules ObjectManager and PropertySheets under OFS folder but<BR>&gt; I really ahve no idea how to use them.<BR>&gt;<BR>&gt; So it I want my product to act like an internally made product with<BR>&gt; baseclass ObjectManager, CatalogAware, and use propertysheets to manage<BR>&gt; my attributes and control what object type I want to store,<BR>&gt;<BR>&gt; would importing ObjectManager, PropertySheets, CatalogAware baseclass be<BR>&gt; enough?<BR><BR>For folderish content you derive from ObjectManager or for being on the <BR>safe
 side from OFS.Folder<BR><BR>from OFS.Folder import Folder<BR><BR>class MyType(Folder):<BR><BR>&nbsp;&nbsp;meta_type= 'MyType'<BR><BR><BR><BR>.....<BR><BR>IntiializeClass(MyType)<BR><BR>-aj</DIV></DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"><BR></DIV></DIV><BR>
<HR SIZE=1>
<A href="http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/" target=_blank rel=nofollow>Never miss an email again!<BR>Yahoo! Toolbar</A> alerts you the instant new Mail arrives.<A href="http://us.rd.yahoo.com/evt=49937/*http://tools.search.yahoo.com/toolbar/features/mail/" target=_blank rel=nofollow> Check it out.</A>
<DIV>_______________________________________________<BR>Zope maillist&nbsp;&nbsp;-&nbsp;&nbsp;Zope@zope.org<BR><A href="http://mail.zope.org/mailman/listinfo/zope" target=_blank>http://mail.zope.org/mailman/listinfo/zope</A><BR>**&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp;&nbsp;**<BR>(Related lists - <BR><A href="http://mail.zope.org/mailman/listinfo/zope-announce" target=_blank>http://mail.zope.org/mailman/listinfo/zope-announce</A><BR><A href="http://mail.zope.org/mailman/listinfo/zope-dev" target=_blank>http://mail.zope.org/mailman/listinfo/zope-dev</A> )</DIV></DIV><BR></DIV></div><br>

<hr size=1>The fish are biting.<br>
<a href="http://us.rd.yahoo.com/evt=49679/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php?o=US2140&cmp=Yahoo&ctv=Q107Tagline&s=Y&s2=EM&b=50"> Get more visitors</a> on your site using <a href="
http://us.rd.yahoo.com/evt=49679/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php?o=US2140&cmp=Yahoo&ctv=Q107Tagline&s=Y&s2=EM&b=50">Yahoo! Search Marketing.</a></body></html>