Re: [Zope3-dev] Deleting utilities in site management doesn't work correct

2005-10-18 Thread Stephan Richter
On Wednesday 05 October 2005 17:00, jürgen Kartnaller wrote:
 When more than one utility is selected for deleting in the site
 management view, only the first selected utility is deleted.

 The problem is that the content of regManager is changed inside the
 while iteratating over it.
 Here is the fix which works for me :
 If this is applicable, can please someone check it into the trunk ?
 The file is in zope.app.component.browser

Could you create an issue in the bug collector for this? If you cannot create 
a unit test for it, then I will. :-)

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Deleting utilities in site management doesn't work correct

2005-10-05 Thread jürgen Kartnaller
When more than one utility is selected for deleting in the site
management view, only the first selected utility is deleted.

The problem is that the content of regManager is changed inside the
while iteratating over it.
Here is the fix which works for me :
If this is applicable, can please someone check it into the trunk ?
The file is in zope.app.component.browser

---

Index: tools.py
===
--- tools.py(revision 38746)
+++ tools.py(working copy)
@@ -192,7 +192,8 @@
 tool = self.activeTool
 regManager = self.context[tool.folder].registrationManager
 names = self.request.form['selected']
-for reg in regManager.values():
+values=[v for v in regManager.values()]
+for reg in values:
 if reg.provided.isOrExtends(tool.interface) and reg.name in
names:
 component = reg.component
 reg.status = interfaces.registration.InactiveStatus

---

Jürgen

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com