[Zope] Re: How to return two images by one procedure

Andreas Tille tillea@rki.de
Wed, 2 Jul 2003 22:56:06 +0200 (CEST)


On Wed, 2 Jul 2003, J Cameron Cooper wrote:

> That'll try to inline the images, which won't work.
Exactly.

> If you want to
> create them at the same time, you'll probably have to create a folder
> with two images in it, and store it somehow. Your external method would
> want to return the name of the created container.
This might be an option here.

> The better answer is to make two methods (one for image, one for key)
> and give both methods the same parameters so they can create images on
> the same information.
I considered this but it would be very bad because I would have to do
the same database query twice which would cause quite bad performance.

My second thought was that I do not really need two images because the
second image could be replaced by one constant image containing plain
colors and returning legend text description combining it with the
image in a table - but this causes fiddling around with save placement
in different browsers.  Moreover this reduces the problem only slightly:
Replace return of two images by one image and a touple of text entries.

> That won't work if you have non-parameterized
> controls (random or external), in which case you'll have to figure out
> some sort of index/snapshot scheme.
I'm afraid I do not understand this sentence.

Kind regards

          Andreas.