On Wed, 17 Jan 2001, Timothy Wilson wrote:

> On Wed, 17 Jan 2001, Tres Seaver wrote:
> > > What I'm not sure about is how to have Zope automatically
> > > display the photo for a day, then archive it. Would a
> > > boolean property of the ZClass work? Is it possible to have
> > > Zope set the property of a ZClass instance at certain time?
> > > Any thoughts on how this would be designed?
> > 
> > This kind of thing is a "query-on-metadata" application;  I
> > would put all these images into a single folder (maybe
> > chunked into subfolders by month?), mark them each with an
> > 'effective' property (of type 'Date'), and then select the
> > appropriate image via a catalog query, e.g.::
> > 
> >   <dtml-in "Catalog( meta_type='Image'
> -- rest of example snipped --
> Are you suggesting I use the standard Image class? What about
> subclassing Image so I can add a display_date property and
> whatever else I might need?

Subclassing Image might be useful, but you could certainly
get by without if, if all you need is to add a property or
two:  Images have a propertysheet to which you could add them.

I suppose it is a matter of taste;  I tend to avoid subclassing
unless the object's behavior changes significantly.

Tres Seaver                                [EMAIL PROTECTED]
Digital Creations     "Zope Dealers"       http://www.zope.org

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to