[Zope-dev] ZPatterns Image Archive Project

Phillip J. Eby pje@telecommunity.com
Fri, 30 Mar 2001 22:15:46 -0500


At 05:27 PM 3/30/01 -0800, Michael R. Bernstein wrote:
>Now I am working on a ArchiveImage ZClass that holds 'meta'
>information about an image, such as the description, a date,
>and keywords.
>
>I want to have one Rack for each image size that I want to
>store.

Just out of curiousity, why do you want seperate racks for each size?  Are
they being stored in different ways or have different behavioral
requirements (e.g. different classes) apart from their size?  If not, there
is probably no reason to have multiple racks.


>I realize that I need to tie the Racks together in the
>specialist using SkinScripts

SkinScript doesn't do anything to tie racks together or to a Specialist -
it's just a way of describing where the data comes from/goes to for a
particular Rack.


>Where do I put the separate Racks? do I create a specialist
>for each Rack (seems unneccessary) or do I put several Racks
>in the same Specialist?

Several in the same, if they are providing objects which fill the same role
in your overall application.


>If the latter, I'm unsure how to use DTML or PythonScripts
>to specify which Rack to create a new item in.
>
>The DTML I am using to instantiate RackImages in the Rack
>for example, is as follows:
>
><dtml-let ni="newItem(REQUEST.id)">
> <dtml-call "ni.manage_edit(REQUEST.title,'')">
> <dtml-call "ni.manage_upload(REQUEST.file)">
></dtml-let>
>
>But this code only works for a Rack named defaultRack, which
>I can obviously only have one of.
>
>Any advice on this would be greatly appreciated.
>

Just use the name of the rack, e.g.:

<dtml-let ni="rackOne.newItem(REQUEST.id)">, etc.

Racks are subobjects of their specialists.