<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"> </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 Item before Folder</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: times new roman, new york, times, serif"> <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"> <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 <swapp0@yahoo.com><BR>To: Zope <zope@zope.org><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> </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"> </DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif">I imported Folder from OFS.Folder 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"> </DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif">my code looks like this--></DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"> </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> id = 'ShpProject'<BR> meta_type = 'ShpProject'<BR> manage_options = (<BR> {'label':'Contents', 'action':'manage_main'},<BR> {'label':'Properties', 'action':'manage_editShpProjectForm'},<BR> {'label':'View', 'action':'index_html'},<BR> ) + Item.manage_options<BR> <BR> def __init__(self, id, projectDesc = 'Test Project'):<BR> """ Initialize a ShpProject Object """<BR> self.id = id<BR> 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> </DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT color=#4040ff size=2> def getProjectInfo(self):<BR> """ print a ShpProject Object Info """<BR> 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> </DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT color=#4040ff size=2> def edit(self, projectDesc, REQUEST=None):<BR> """ edit a ShpProject Object """<BR> self.projectDesc = projectDesc<BR> if REQUEST is not None:<BR> 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> </DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT color=#4040ff size=2> ##Web Methods<BR> index_html = HTMLFile('DTML/index_html', globals())<BR> 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> </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 unsave in anyway?</DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 14pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Andreas Jung <lists@zopyx.com><BR>To: Allen Huang <swapp0@yahoo.com>; Zope <zope@zope.org><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 <swapp0@yahoo.com> wrote:<BR><BR>> I made a simple product using python that stores some varibles, but I<BR>> couldn't make it acts like a folderish, stores objects, and have a<BR>> content tab page using manage_main like when I use to have when I use<BR>> internal product.<BR>><BR>> I reviewed the tutorials on how to make internal products and I found the<BR>> base class modules ObjectManager and PropertySheets under OFS folder but<BR>> I really ahve no idea how to use them.<BR>><BR>> So it I want my product to act like an internally made product with<BR>> baseclass ObjectManager, CatalogAware, and use propertysheets to manage<BR>> my attributes and control what object type I want to store,<BR>><BR>> would importing ObjectManager, PropertySheets, CatalogAware baseclass be<BR>> 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> 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 - Zope@zope.org<BR><A href="http://mail.zope.org/mailman/listinfo/zope" target=_blank>http://mail.zope.org/mailman/listinfo/zope</A><BR>** No cross posts or HTML encoding! **<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>