]> granicus.if.org Git - python/commitdiff
Fixed multi-arg appends.
authorJack Jansen <jack.jansen@cwi.nl>
Tue, 7 Mar 2000 23:40:13 +0000 (23:40 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Tue, 7 Mar 2000 23:40:13 +0000 (23:40 +0000)
12 files changed:
Mac/Demo/PICTbrowse/ICONbrowse.py
Mac/Demo/PICTbrowse/PICTbrowse.py
Mac/Demo/PICTbrowse/PICTbrowse2.py
Mac/Demo/PICTbrowse/cicnbrowse.py
Mac/Demo/PICTbrowse/oldPICTbrowse.py
Mac/Demo/speech/grail.py
Mac/Lib/FrameWork.py
Mac/Tools/IDE/PythonIDEMain.py
Mac/Tools/IDE/Wbase.py
Mac/Tools/twit/mactwit_browser.py
Mac/scripts/cfmfile.py
Mac/scripts/gensuitemodule.py

index f5ea93be302687c9a740f72449d0939cbe3134fc..4e20b7f37a5617ae5221ab6c91d1a089abb54114 100644 (file)
@@ -70,7 +70,7 @@ class ICONbrowse(FrameWork.Application):
                        finally:
                                Res.SetResLoad(1)
                        id, type, name = r.GetResInfo()
-                       rv.append(id, name)
+                       rv.append((id, name))
                return rv
                
 class ICONwindow(FrameWork.Window):
index a28837f61d1d1edb264e98e2eb2588e5d90f14c0..653dd5d12d594a5f21ea5f838c3b0964d1283a10 100644 (file)
@@ -65,7 +65,7 @@ class PICTbrowse(FrameWork.Application):
                        finally:
                                Res.SetResLoad(1)
                        id, type, name = r.GetResInfo()
-                       rv.append(id, name)
+                       rv.append((id, name))
                return rv
                
 class PICTwindow(FrameWork.Window):
index 60f1c70c13164544af89a1f25ea24555eddb6aa6..31169eea54b02a1d936b5807a4ab7ea35f2e21c6 100644 (file)
@@ -69,7 +69,7 @@ class PICTbrowse(FrameWork.Application):
                        finally:
                                Res.SetResLoad(1)
                        id, type, name = r.GetResInfo()
-                       rv.append(id, name)
+                       rv.append((id, name))
                return rv
                
 class PICTwindow(FrameWork.Window):
index 38e3bedaf4fa35313a80644562d1f6283699b37b..67ec355fc15daf8ec916a8fef89b9580e3e9b16c 100644 (file)
@@ -70,7 +70,7 @@ class CIconbrowse(FrameWork.Application):
                        finally:
                                Res.SetResLoad(1)
                        id, type, name = r.GetResInfo()
-                       rv.append(id, name)
+                       rv.append((id, name))
                return rv
                
 class CIconwindow(FrameWork.Window):
index 9e9dcd574e4cbaffe45c1d504b44346fcb5383f1..70b910e7d0d69cd628a942dea87e834f549f2a7c 100644 (file)
@@ -64,7 +64,7 @@ class PICTbrowse(FrameWork.Application):
                        finally:
                                Res.SetResLoad(1)
                        id, type, name = r.GetResInfo()
-                       rv.append(id, name)
+                       rv.append((id, name))
                return rv
                
 class PICTwindow(FrameWork.Window):
index d9265698448277e116664dd19ad23e45f028211b..4f95b9a29a0b57afac68f4253d19b1969bcd3f22 100644 (file)
@@ -77,7 +77,7 @@ def readscript(file):
        for i in range(len(lines)):
                tp, data = parseline(lines[i])
                if tp == NEWSCENE:
-                       acts.append(actor_dict.keys(), lines[prev_act:i])
+                       acts.append((actor_dict.keys(), lines[prev_act:i]))
                        prev_act = i
                        actor_dict = {}
                elif tp == TEXT:
index e56679dea180043315c4a20c0a50376e3fcc5200..320f141b83f34519c6d2db50c58c15df717a1140 100644 (file)
@@ -512,6 +512,7 @@ class Menu:
        def delete(self):
                self.bar.delmenu(self.id)
                del self.bar.menus[self.id]
+               self.menu.DisposeMenu()
                del self.bar
                del self.items
                del self.menu
@@ -520,7 +521,7 @@ class Menu:
                
        def additem(self, label, shortcut=None, callback=None, kind=None):
                self.menu.AppendMenu('x')               # add a dummy string
-               self.items.append(label, shortcut, callback, kind)
+               self.items.append((label, shortcut, callback, kind))
                item = len(self.items)
                self.menu.SetMenuItemText(item, label)          # set the actual text
                if shortcut and type(shortcut) == type(()):
@@ -547,7 +548,7 @@ class Menu:
        
        def addseparator(self):
                self.menu.AppendMenu('(-')
-               self.items.append('', None, None, 'separator')
+               self.items.append(('', None, None, 'separator'))
        
        def addsubmenu(self, label, title=''):
                sub = Menu(self.bar, title, -1)
index 69223f5c2ae97ddce17f19fa47a57372b7dfae13..a340eefb9de41b2908b536d42016f48da2b9ff53 100644 (file)
@@ -204,7 +204,7 @@ class PythonIDE(Wapplication.Application):
                        title = window.GetWTitle()
                        if not title:
                                title = "<no title>"
-                       windows.append(title, window)
+                       windows.append((title, window))
                windows.sort()
                for title, window in windows:
                        if title == "Python Interactive":       # ugly but useful hack by Joe Strout
index 46a8c96d84149d6ad19b6d8ff54387eeb9966c2b..e1e71b2d7cd111628937aab57e373b816bae5ff5 100644 (file)
@@ -490,7 +490,7 @@ class HorizontalPanes(Widget):
                for panesize in panesizes:
                        if current:
                                self._gutters.append(current)
-                       self._panesizes.append(current, current + panesize)
+                       self._panesizes.append((current, current + panesize))
                        current = current + panesize
                self.makepanebounds()
        
index 4c711466415a1a3a435ae2bff617f762b66afc87..a8968ca4b0e8ba54f421c19b1b468a1cb74c9562 100644 (file)
@@ -300,7 +300,7 @@ class VarBrowser(FrameWork.DialogWindow):
                self.scroll(-1)
                point = (0, 0)
                ok, point = self.lists[0].list.LGetSelect(1, point)
-               self.leftover.append(point, self.lists[0].content, self.lists[0].title, self.lists[0].active)
+               self.leftover.append((point, self.lists[0].content, self.lists[0].title, self.lists[0].active))
                for i in range(len(self.lists)-1):
                        point = (0, 0)
                        ok, point = self.lists[i+1].list.LGetSelect(1, point)
@@ -331,7 +331,7 @@ class VarBrowser(FrameWork.DialogWindow):
                if self.lists[-1].content <> None:
                        point = (0, 0)
                        ok, point = self.lists[-1].list.LGetSelect(1, point)
-                       self.rightover.append(point, self.lists[-1].content, self.lists[-1].title, self.lists[-1].active )
+                       self.rightover.append((point, self.lists[-1].content, self.lists[-1].title, self.lists[-1].active ))
                for i in range(len(self.lists)-1, 0, -1):
                        point = (0, 0)
                        ok, point = self.lists[i-1].list.LGetSelect(1, point)
index 1a50a677014a14a7520e0ca28fc53d4d526c6487..5b416f6a1207b7a179dfc1c4a7c152fd6f31393c 100644 (file)
@@ -215,7 +215,7 @@ def mergecfmfiles(inputs, output):
                        if (tp, id) in resources_done:
                                continue
                        i.saveresto(tp, id, rfork)
-                       resources_done.append(tp, id)
+                       resources_done.append((tp, id))
                        
 def main():
        list = []
index 53da22c1cea424fe76391402738d955b35596901..25595df4c2035021adbf7d864a51f341e50c7c63 100644 (file)
@@ -494,7 +494,7 @@ class ObjectCompiler:
                        if not name:
                                self.fp.write("# XXXX %s element %s not found!!\n"%(cname, `ecode`))
                        else:
-                               elist.append(name, ename)
+                               elist.append((name, ename))
                        
                self.fp.write("%s._propdict = {\n"%cname)
                for n in plist: