[spambayes-dev] Small patch to Outlook2000/dialogs/FolderSelector.py

Sean True seant at webreply.com
Mon Feb 9 19:16:22 EST 2004


Integrating this with some other code appears to reveal a bug in the code
that keeps the node labels
in memory. The object is returned from Pack...Item() in order to keep it the
scope of the caller, but
it appears that that is not enough: symptom was that the labels got
splattered by other data unless they are kept
in scope longer.

I've got developer status, but my CVS access is extremely inconsistent, so I
will toss this out
and see if anyone else likes it well enough to check it in.

-- Sean


 --- ..\..\..\spambayes-latest-cvs\Outlook2000\dialogs\FolderSelector.py
Tue Dec 30 11:26:32 2003
+++ FolderSelector.py	Mon Feb  9 19:06:59 2004
@@ -276,6 +276,8 @@
                                     ):
         FolderSelector_Parent.__init__(self, parent, manager.dialog_parser,
"IDD_FOLDER_SELECTOR")
         assert not single_select or selected_ids is None or
len(selected_ids)<=1
+        # List of things to keep in scope for a while
+        self.extras = []
         self.single_select = single_select
         self.next_item_id = 1
         self.item_map = {}
@@ -343,6 +345,8 @@
                                         bitmapSel,
                                         cItems,
                                         item_id))
+        # Keep the buffered string info in scope
+        self.extras = self.extras + extras
         if verbose:
             print "Inserting item", repr(insert_buf), "-",
         hitem = win32gui.SendMessage(self.list, commctrl.TVM_INSERTITEM,
 
 
 
==============
Sean True
 
 
 





More information about the spambayes-dev mailing list