Fixed multi-arg appends.

This commit is contained in:
Jack Jansen 2000-03-07 23:40:13 +00:00
parent 9de988315a
commit 34d11f0670
12 changed files with 15 additions and 14 deletions

View file

@ -70,7 +70,7 @@ class ICONbrowse(FrameWork.Application):
finally: finally:
Res.SetResLoad(1) Res.SetResLoad(1)
id, type, name = r.GetResInfo() id, type, name = r.GetResInfo()
rv.append(id, name) rv.append((id, name))
return rv return rv
class ICONwindow(FrameWork.Window): class ICONwindow(FrameWork.Window):

View file

@ -65,7 +65,7 @@ class PICTbrowse(FrameWork.Application):
finally: finally:
Res.SetResLoad(1) Res.SetResLoad(1)
id, type, name = r.GetResInfo() id, type, name = r.GetResInfo()
rv.append(id, name) rv.append((id, name))
return rv return rv
class PICTwindow(FrameWork.Window): class PICTwindow(FrameWork.Window):

View file

@ -69,7 +69,7 @@ class PICTbrowse(FrameWork.Application):
finally: finally:
Res.SetResLoad(1) Res.SetResLoad(1)
id, type, name = r.GetResInfo() id, type, name = r.GetResInfo()
rv.append(id, name) rv.append((id, name))
return rv return rv
class PICTwindow(FrameWork.Window): class PICTwindow(FrameWork.Window):

View file

@ -70,7 +70,7 @@ class CIconbrowse(FrameWork.Application):
finally: finally:
Res.SetResLoad(1) Res.SetResLoad(1)
id, type, name = r.GetResInfo() id, type, name = r.GetResInfo()
rv.append(id, name) rv.append((id, name))
return rv return rv
class CIconwindow(FrameWork.Window): class CIconwindow(FrameWork.Window):

View file

@ -64,7 +64,7 @@ class PICTbrowse(FrameWork.Application):
finally: finally:
Res.SetResLoad(1) Res.SetResLoad(1)
id, type, name = r.GetResInfo() id, type, name = r.GetResInfo()
rv.append(id, name) rv.append((id, name))
return rv return rv
class PICTwindow(FrameWork.Window): class PICTwindow(FrameWork.Window):

View file

@ -77,7 +77,7 @@ def readscript(file):
for i in range(len(lines)): for i in range(len(lines)):
tp, data = parseline(lines[i]) tp, data = parseline(lines[i])
if tp == NEWSCENE: if tp == NEWSCENE:
acts.append(actor_dict.keys(), lines[prev_act:i]) acts.append((actor_dict.keys(), lines[prev_act:i]))
prev_act = i prev_act = i
actor_dict = {} actor_dict = {}
elif tp == TEXT: elif tp == TEXT:

View file

@ -512,6 +512,7 @@ class Menu:
def delete(self): def delete(self):
self.bar.delmenu(self.id) self.bar.delmenu(self.id)
del self.bar.menus[self.id] del self.bar.menus[self.id]
self.menu.DisposeMenu()
del self.bar del self.bar
del self.items del self.items
del self.menu del self.menu
@ -520,7 +521,7 @@ class Menu:
def additem(self, label, shortcut=None, callback=None, kind=None): def additem(self, label, shortcut=None, callback=None, kind=None):
self.menu.AppendMenu('x') # add a dummy string 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) item = len(self.items)
self.menu.SetMenuItemText(item, label) # set the actual text self.menu.SetMenuItemText(item, label) # set the actual text
if shortcut and type(shortcut) == type(()): if shortcut and type(shortcut) == type(()):
@ -547,7 +548,7 @@ class Menu:
def addseparator(self): def addseparator(self):
self.menu.AppendMenu('(-') self.menu.AppendMenu('(-')
self.items.append('', None, None, 'separator') self.items.append(('', None, None, 'separator'))
def addsubmenu(self, label, title=''): def addsubmenu(self, label, title=''):
sub = Menu(self.bar, title, -1) sub = Menu(self.bar, title, -1)

View file

@ -204,7 +204,7 @@ class PythonIDE(Wapplication.Application):
title = window.GetWTitle() title = window.GetWTitle()
if not title: if not title:
title = "<no title>" title = "<no title>"
windows.append(title, window) windows.append((title, window))
windows.sort() windows.sort()
for title, window in windows: for title, window in windows:
if title == "Python Interactive": # ugly but useful hack by Joe Strout if title == "Python Interactive": # ugly but useful hack by Joe Strout

View file

@ -490,7 +490,7 @@ class HorizontalPanes(Widget):
for panesize in panesizes: for panesize in panesizes:
if current: if current:
self._gutters.append(current) self._gutters.append(current)
self._panesizes.append(current, current + panesize) self._panesizes.append((current, current + panesize))
current = current + panesize current = current + panesize
self.makepanebounds() self.makepanebounds()

View file

@ -300,7 +300,7 @@ class VarBrowser(FrameWork.DialogWindow):
self.scroll(-1) self.scroll(-1)
point = (0, 0) point = (0, 0)
ok, point = self.lists[0].list.LGetSelect(1, point) 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): for i in range(len(self.lists)-1):
point = (0, 0) point = (0, 0)
ok, point = self.lists[i+1].list.LGetSelect(1, point) ok, point = self.lists[i+1].list.LGetSelect(1, point)
@ -331,7 +331,7 @@ class VarBrowser(FrameWork.DialogWindow):
if self.lists[-1].content <> None: if self.lists[-1].content <> None:
point = (0, 0) point = (0, 0)
ok, point = self.lists[-1].list.LGetSelect(1, point) 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): for i in range(len(self.lists)-1, 0, -1):
point = (0, 0) point = (0, 0)
ok, point = self.lists[i-1].list.LGetSelect(1, point) ok, point = self.lists[i-1].list.LGetSelect(1, point)

View file

@ -215,7 +215,7 @@ def mergecfmfiles(inputs, output):
if (tp, id) in resources_done: if (tp, id) in resources_done:
continue continue
i.saveresto(tp, id, rfork) i.saveresto(tp, id, rfork)
resources_done.append(tp, id) resources_done.append((tp, id))
def main(): def main():
list = [] list = []

View file

@ -494,7 +494,7 @@ class ObjectCompiler:
if not name: if not name:
self.fp.write("# XXXX %s element %s not found!!\n"%(cname, `ecode`)) self.fp.write("# XXXX %s element %s not found!!\n"%(cname, `ecode`))
else: else:
elist.append(name, ename) elist.append((name, ename))
self.fp.write("%s._propdict = {\n"%cname) self.fp.write("%s._propdict = {\n"%cname)
for n in plist: for n in plist: