From: Alex T. <ale...@us...> - 2006-01-14 12:11:57
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15479 Modified Files: helpful.py Log Message: Changed StringType to StringTypes, simplified import of types. Index: helpful.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/helpful.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** helpful.py 26 Dec 2005 19:08:03 -0000 1.4 --- helpful.py 14 Jan 2006 12:11:49 -0000 1.5 *************** *** 10,14 **** import wx import string, copy ! from types import * --- 10,14 ---- import wx import string, copy ! import types *************** *** 50,54 **** bx, by = self.components.Button.size for b in buttons: ! if type(b) == types.StringType: self.components.Button.label = b else: --- 50,54 ---- bx, by = self.components.Button.size for b in buttons: ! if isinstance(b, types.StringTypes): self.components.Button.label = b else: *************** *** 73,77 **** count = 0 for b in localbuttons: ! if type(b) == types.StringType: theName = b theToolTip = '' --- 73,77 ---- count = 0 for b in localbuttons: ! if isinstance(b, types.StringTypes): theName = b theToolTip = '' *************** *** 152,156 **** val = False toolTip = '' ! if type(b) == types.StringType: key = b else: --- 152,156 ---- val = False toolTip = '' ! if isinstance(b, types.StringTypes): key = b else: *************** *** 224,228 **** # wrapper to help with pop up menus - import types class PopUpMenu: --- 224,227 ---- *************** *** 238,242 **** # add the items for it in items: ! if type(it) == types.StringType: Id = wx.NewId() self.popup[it] = Id --- 237,241 ---- # add the items for it in items: ! if isinstance(it, types.StringTypes): Id = wx.NewId() self.popup[it] = Id *************** *** 250,254 **** aBg.Bind(wx.EVT_MENU, self.OnPopup, id=Id) for that in it: ! if type(that) == types.StringType: Id = wx.NewId() self.popup[that] = Id --- 249,253 ---- aBg.Bind(wx.EVT_MENU, self.OnPopup, id=Id) for that in it: ! if isinstance(that, types.StringTypes): Id = wx.NewId() self.popup[that] = Id |