[Zope] Re: using ImageTag_Hotfix

marc lindahl marc@bowery.com
Fri, 19 Oct 2001 20:11:55 -0400


Thanks for the answer...

The two problems with associating at creation time:

1. The RAMCache name (and possibly location in the heirarchy) has to be
preset somehow... though I guess it could be via a property.  But that's
another question - how to have a property page in a Python product like you
can do in a ZClass based product....

2. If you want to change anything later it's a pain (like the location of
the cache, and of course, there's a question of what happens if you
cut/copy/paste e.g. the image itself).

But besides that it's the only way to do it...

Also, I still can't find good doc on how the RAMCache should be set up, etc.
for something like this...

> From: Danny William Adair <danny@adair.net>

> 
> These two files should actually be all you need to mimick the ZMI's behavior.
> The right call to myRAMCache.ZCacheManager_setAssociations is probably what
> does the trick (doing that whenever you create an image object, maybe some
> ZClass derived from ZImage that has this call in its constructor ("add"
> method)). What you would need to gather up is what sort of information
> ZCacheManager_setAssociations expects in "props" and "REQUEST", which in your
> case will probably be a very small subset of what you find in the ZMI's dtml
> file.
> 
> hth,
> and sorry for not providing a copy&paste answer,
> I just don't know enough about ZCacheManagers,
> 
> Danny