[Zope] How to remove Items from ZPatterns:Rack in the right way ?

iap_y2fun.com iap@y2fun.com
Thu, 30 Nov 2000 17:39:26 +0800


Hi, I have a question about ZPatterns:Rack.
I got 10 items in a Rack and I want to remove those objects.
By reading Rack.py , I know that manage_pack can do this for me if
getItem(key) return None for those objects.
Well, how to return None?
One way I found is that: under "Storage" manage_tab, there is a option:

{Objects are:  loaded by accessing attribute  [xxxxx]}

assign xxxxx to be a "non-existing method", ie, any string except those
attributes' names.

Then, by clicking "remove orphaned slot" which triggers manage_pack.
I can see the counter of "Persistent slot in use" was reduced.
The question is that: why it reduced gradually? It doesn't reduce to 0 by
just one click.
I have to click it several times in order to remove all of them.
How does it happens? What's the right way to remove an item from a Rack?

Thanks a lot.

Iap,Singuan