[Zope] CatalogAware ZClass with File base class

Kevin Dangoor kid@kendermedia.com
Mon, 1 May 2000 17:06:41 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_0127_01BFB38F.9E8B7CA0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Caveat: I've never made a ZClass with File as a base class...

I just thought I would double check that in your ZClass_add method, you =
do this:

<dtml-with "createInObjectManager...">
  <dtml-call =
"propertysheet.YourPropSheet.manage_editProperties(REQUEST)">
  <dtml-call reindex_object>
</dtml-with>

If you don't store the properties and reindex the object, the object =
will be added to the catalog but won't be particularly useful because =
there won't be any values for the properties stored in the indexes and =
meta data.

Kevin
  ----- Original Message -----=20
  From: Fusion Group=20
  To: zope@zope.org=20
  Sent: Monday, May 01, 2000 4:27 PM
  Subject: [Zope] CatalogAware ZClass with File base class


  I wanted to make my new File objects CatalogAware so I created a new =
ZClass with CatalogAware and File as my base classes (in that order).  =
When I upload a new file, calling manage_addFile from my ZClass, it of =
course is not made available for my Catalog. =20

  I know I'm doing this wrong, but I'm starting to run out of time on =
this project and can't afford the luxury of fiddling until I figure it =
out anymore.  I probably should have fiddled with Zope a little before I =
used it for a client's project, but it's too late now.


------=_NextPart_000_0127_01BFB38F.9E8B7CA0
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.3013.2600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Caveat: I've never made a ZClass with File as a base =

class...</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>I just thought I would double check that in your =
ZClass_add=20
method, you do this:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>&lt;dtml-with =
"createInObjectManager..."&gt;</FONT></DIV>
<DIV><FONT size=3D2>&nbsp; &lt;dtml-call=20
"propertysheet.YourPropSheet.manage_editProperties(REQUEST)"&gt;</FONT></=
DIV>
<DIV><FONT size=3D2>&nbsp; &lt;dtml-call reindex_object&gt;</FONT></DIV>
<DIV><FONT size=3D2>&lt;/dtml-with&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>If you don't store the properties and reindex the =
object, the=20
object will be added to the catalog but won't be particularly useful =
because=20
there won't be any values for the properties stored in the indexes and =
meta=20
data.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>Kevin</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A href=3D"mailto:spencec@the-fusion-group.com"=20
  title=3Dspencec@the-fusion-group.com>Fusion Group</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
href=3D"mailto:zope@zope.org"=20
  title=3Dzope@zope.org>zope@zope.org</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Monday, May 01, 2000 4:27 =
PM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [Zope] CatalogAware =
ZClass with=20
  File base class</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=3DArial size=3D2>I wanted to make my new File objects =
CatalogAware=20
  so I created a new ZClass with CatalogAware and File as my base =
classes (in=20
  that order).&nbsp; When I upload a new file, calling manage_addFile =
from my=20
  ZClass, it of course&nbsp;is not&nbsp;made available&nbsp;for my=20
  Catalog.&nbsp; </FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>I know I'm doing this wrong, but I'm =
starting to=20
  run out of time on this project and can't afford the luxury of =
fiddling until=20
  I figure it out anymore.&nbsp; I probably should have fiddled with =
Zope a=20
  little before I used it for a client's project, but it's too late=20
  now.</FONT></DIV>
  <DIV>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0127_01BFB38F.9E8B7CA0--