[Zope] - Image object enhancements (patch included!)

Ty Sarna tsarna@endicor.com
Mon, 7 Dec 1998 16:51:37 -0600 (CST)


Kent Polk wrote:
> > The __str__ method on images really needs to figure out the true
> > absolute path of the object and use that. (like <IMG SRC="/site/logo">)
> 
> I'm a bit worried that this will tend to break acquisition behavior
> in general. For these types of problem, I'd tend to just specify the
> absolute URL in the reference. Deals with the problem without having
> to change acquisition.

I don't think it would break anything. Basically, you know that the
identical Image object is available at this other place, so you're just
precalculating the acquisition. Instead of telling the browser that the
image is at B when it's really at A, and then having a fetch of it at B
acquire the version at A, the Image object just short-circuits this and
tells the browser that it's at A to begin with. The change would be
local to the Image product and wouldn't affect the Acquisition machinery
at all.

Then again, I haven't tried it yet, so maybe I'm missing something. And
I'd better get back to work before you come over here and beat me up :^)