patch: fixing AutoCombo bug

Luis Ricardo Boni rico at async.com.br
Fri Jan 9 18:15:07 BRDT 2004


Hi!

AutoCombo was crashing when trying to convert an object to text if
initialized by a proxy and the attribute already contains data. The
update can not be done in __initialize because the strings list is
known only after the prefill.

Index: Kiwi/Proxies.py
===================================================================
RCS file: /usr/local/cvssrc/Kiwi/Kiwi/Proxies.py,v
retrieving revision 1.82
diff -u -p -r1.82 Proxies.py
--- Kiwi/Proxies.py	5 Dec 2003 01:30:46 -0000	1.82
+++ Kiwi/Proxies.py	9 Jan 2004 18:49:54 -0000
@@ -145,7 +145,8 @@ mind.
 
             update = getattr(self, "tweak_%s" % name, None) or \
                      self.update
-            update(name, value)
+            if not isinstance(proxy, Entry.KiwiComboProxy):
+                update(name, value)
 
     def set_setter_error_handler(self, handler):
         """Sets a method that will be call if an update to a model


[]'s,
Rico
--
Luis Ricardo Boni : rico at async.com.br : (16) 261 2177
Async Open Source : www.async.com.br  : (16) 261 2331


More information about the Kiwi mailing list