[Zope3-checkins] SVN: Zope3/branches/testbrowser-integration/src/zope/app/testing/testbrowser/browser.py Make _findControl a regular method.

Stephan Richter srichter at cosmos.phy.tufts.edu
Wed Jul 27 10:12:55 EDT 2005


Log message for revision 37483:
  Make _findControl a regular method.
  

Changed:
  U   Zope3/branches/testbrowser-integration/src/zope/app/testing/testbrowser/browser.py

-=-
Modified: Zope3/branches/testbrowser-integration/src/zope/app/testing/testbrowser/browser.py
===================================================================
--- Zope3/branches/testbrowser-integration/src/zope/app/testing/testbrowser/browser.py	2005-07-27 13:58:22 UTC (rev 37482)
+++ Zope3/branches/testbrowser-integration/src/zope/app/testing/testbrowser/browser.py	2005-07-27 14:12:53 UTC (rev 37483)
@@ -95,20 +95,17 @@
                                           url_regex=url_regex)
         self._changed()
 
-    @property
-    def _findControl(self):
-        def _findControl(text, id, name, type=None, form=None):
-            for control_form, control in self._controls:
-                if form is None or control_form == form:
-                    if (((id is not None and control.id == id)
-                    or (name is not None and control.name == name)
-                    or (text is not None and re.search(text, str(control.value)))
-                    ) and (type is None or control.type == type)):
-                        self.mech_browser.form = control_form
-                        return control_form, control
-
-            return None, None
-        return _findControl
+    def _findControl(self, text, id, name, type=None, form=None):
+        for control_form, control in self._controls:
+            if form is None or control_form == form:
+                if (((id is not None and control.id == id)
+                or (name is not None and control.name == name)
+                or (text is not None and re.search(text, str(control.value)))
+                ) and (type is None or control.type == type)):
+                    self.mech_browser.form = control_form
+                    return control_form, control
+    
+        return None, None
         
     def _findForm(self, id, name, action):
         for form in self.mech_browser.forms():



More information about the Zope3-Checkins mailing list