From: Kevin A. <al...@se...> - 2004-04-05 19:48:14
|
Note that Linux RPMs haven't been built yet and the Linux installation=20= instructions are still for 0.7.2, but they should be updated soon. You=20= can use the tar.gz file to install PythonCard on Linux and Mac OS X. Please report any problems to the list. Thanks, ka --- PythonCard is a GUI construction kit for building cross-platform=20 desktop applications on Windows, Mac OS X, and Linux. Release 0.7.3 includes over 40 sample applications and tools to help=20 users build applications in Python, including codeEditor, findfiles,=20 and resourceEditor (layout editor). A list of changes since release=20 0.7.2 is at the end of this message. All the information you need about PythonCard can be found on the=20 project web page at: http://pythoncard.sourceforge.net/ The installation instructions and walkthroughs are available on the=20 main documentation page: http://pythoncard.sourceforge.net/documentation.html You can download the latest release at: http://sourceforge.net/project/showfiles.php?group_id=3D19015 For a list of most of the samples that have been built with PythonCard=20= and screenshots of them in action go to: http://pythoncard.sourceforge.net/samples/samples.html The kind people at SourceForge host the project: http://sourceforge.net/projects/pythoncard/ If you want to get involved the main contact point is the Mailing list: http://lists.sourceforge.net/lists/listinfo/pythoncard-users PythonCard requires Python 2.2.1 or later and wxPython 2.4.1.2 or=20 later. wxPython can be downloaded at http://www.wxpython.org/ Additional Notes: Remember to backup or just delete your old PythonCardPrototype=20 directory before installing a new version, so that the old files aren't=20= still in the package directory. If you installed a previous version of=20= PythonCard on Windows using the binary installer, then you should be=20 able to remove the old package via the Add/Remove Programs Control=20 Panel. The distutils installer will put the framework, components, docs,=20 samples, and tools in Lib\site-packages or your Python directory=20 (typically C:\Python22 or C:\Python23). Of course, on Linux and Mac OS=20= X that path will be slightly different and have forward slashes. Windows users should get a PythonCard menu in the Start->Programs menu=20= with links to the documentation, samples, codeEditor, findfiles, and=20 resourceEditor. The tools and most of the samples will now keep their config and data=20 file info in the "pythoncard_config" directory created by the=20 framework. On Unix, the directory will be ~/pythoncard_config. On=20 Windows, the directory varies as described in the following post: http://aspn.activestate.com/ASPN/Mail/Message/PythonCard/1496793 So, if you run a PythonCard app with any of the runtime tools and=20 select "Save Configuration" from the "Debug" menu, the window positions=20= and sizes of your runtime windows (Shell, Message Watcher, etc.) will=20 be saved in "pythoncard_config/pythoncard_config.txt" not the=20 PythonCardPrototype directory. Likewise, when you change the text style=20= used by the codeEditor via the "Styles..." menu item under the "Format"=20= menu, the modification will be saved in=20 "pythoncard_config/stc-styles.rc.cfg" ka --- Kevin Altis al...@se... http://altis.pycs.net/ Release 0.7.3 2004-04-03 changed py2exe scripts for version 0.5 syntax dropped support of PyCrust in wxPython 2.4.0.7 and earlier added check to avoid unneeded widget initialization added TextArea workaround for GetValue on the Mac McPC and RanchBiz added to moreapplications.html added lowercase skip alias for Skip to dispatch.py switched to mixedCase style names for BitmapCanvas added new-style class properties to Background and CustomDialog classes: position, size, etc. added leading underscore to addEventListener and notifyEventListeners methods changed _getAttributeNames to use inspect module updated Windows installation docs for Python 2.3 and wxPython 2.4.2.4 added explicit Stop() for timers when app is closed added donations.html fixed default Mac menubar handling converted legacy class name comparisons to __class__.__name__ removed RightTextField component, use TextField with 'alignment':'right' attribute instead many modifications to support wxPython 2.5 and higher in general, just look for code starting with if wx.wxVERSION > (2, 5): to see the version specific changes also modified spacers for sizers to use tuples instead of separate w, h args some items are marked with a "wxPython 2.5 change" comment all changes are being done so that release 0.7.3 will work with wxPython 2.4.x or wxPython 2.5.x or higher future releases may drop support for wxPython 2.4.x EXIF.py updated to remove Python 2.3 warnings added support for Python 2.3 .chm file on Windows =00= |
From: Kenneth P. <pro...@sk...> - 2004-04-06 03:07:26
|
On Mon, Apr 05, 2004 at 12:48:10PM -0700, Kevin Altis wrote: > Note that Linux RPMs haven't been built yet and the Linux installation > instructions are still for 0.7.2, but they should be updated soon. You > can use the tar.gz file to install PythonCard on Linux and Mac OS X. Debian packages have been uploaded and should start hitting mirrors within a day or so (perhaps less). There are no big changes in the packages from the last release; I'm still building against Python 2.3 and wxPython 2.4.2.4, since that's what I have available to me. Hmm. It must be getting late. I can't remember how the .deb files for the previous releases got onto the SourceForge site. Let me know if you want the .debs for 0.7.3 up there or not. I updated the online Wiki section related to Debian. It now says that the "preferred" method of installing for Debian (in most cases) is to use my binary packages via apt. I added a few other details, too. If anyone has any comments, let me know. > Please report any problems to the list. I didn't notice any problems in my (somewhat minor) testing. Thanks, KEN -- Kenneth J. Pronovici <pro...@sk...> Personal Homepage: http://www.skyjammer.com/~pronovic/ "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - Benjamin Franklin, Historical Review of Pennsylvania, 1759 |
From: Phil E. <ph...@li...> - 2004-04-06 19:19:44
|
On Tuesday 06 Apr 2004 4:07 am, Kenneth Pronovici wrote: > On Mon, Apr 05, 2004 at 12:48:10PM -0700, Kevin Altis wrote: > > Note that Linux RPMs haven't been built yet and the Linux installation > > instructions are still for 0.7.2, but they should be updated soon. You > > can use the tar.gz file to install PythonCard on Linux and Mac OS X. > New RPM's are being built now, I'll upload them when done... -- Regards Phil Edwards Brighton, UK |
From: Phil E. <ph...@li...> - 2004-04-07 11:33:06
|
On Tuesday 06 Apr 2004 8:11 pm, Phil Edwards wrote: > > New RPM's are being built now, I'll upload them when done... I've got a hard drive problem on one of my machines - I've got backups so it's an inconvenience as opposed to a major disaster, but it means the new RPM's won't be ready until the end of today at the earliest. :-( -- Regards Phil Edwards Brighton, UK |
From: Phil E. <ph...@li...> - 2004-04-07 16:56:44
|
On Wednesday 07 Apr 2004 12:22 pm, Phil Edwards wrote: > > I've got a hard drive problem on one of my machines - I've got backups so > it's an inconvenience as opposed to a major disaster, but it means the new > RPM's won't be ready until the end of today at the earliest. :-( Okay, back up and running, thank $DEITY for recordable DVD's.... Now, I have a problem with 0.7.3 when running with python 2.2.2 and wxPython 2.5. I've installed 0.7.3 from the tarball and wxPython from the RPM on wxpython.org. When I run the resource editor from a command line prompt, I get this: -----begin----- [phile@localhost phile]$ /usr/lib/python2.2/site-packages/PythonCardPrototype/tools/resourceEditor/resourceEditor.py Traceback (most recent call last): File "/usr/lib/python2.2/site-packages/PythonCardPrototype/binding.py", line 268, in dispatchOpenBackground self.scriptable.dispatch.eventOccurred( event.OpenBackgroundEvent( self.scriptable ) ) File "/usr/lib/python2.2/site-packages/PythonCardPrototype/dispatch.py", line 83, in eventOccurred handler.getFunction()(self._scriptable, nativeEvent) File "/usr/lib/python2.2/site-packages/PythonCardPrototype/tools/resourceEditor/resourceEditor.py", line 134, in on_openBackground self.updatePanel(self.rsrc) File "/usr/lib/python2.2/site-packages/PythonCardPrototype/tools/resourceEditor/resourceEditor.py", line 1243, in updatePanel self.menuBar.setEnabled('menuFileRun', 1) File "/usr/lib/python2.2/site-packages/PythonCardPrototype/menu.py", line 309, in setEnabled self.Enable(id, aBoolean) File "/usr/lib/python2.2/site-packages/wx/core.py", line 7602, in Enable return _core.MenuBar_Enable(*args, **kwargs) wx.core.PyAssertionError: C++ assertion "wxAssertFailure" failed in ../src/common/menucmn.cpp(896): attempt to enable an item which doesn't exist ------end------ The problem is that at line 309 (line 316 in the code below) of menu.py, the value of 'id' is set to -1 when it tries to call self.Enable(). As far as I can see, the code in this part of menu.py hasn't changed between 0.7.2 and 0.7.3, so I'm stumped as to what's going on. I put a bunch of print statements into menu.py so it looks like this: 299 def setEnabled( self, aString, aBoolean=1) : 300 print 'setEnabled, aString = [%s], aBoolean = [%s]' % (aString, aBoolean) 301 i = 0 302 for m in self.menus: 303 print 'm is now [%s]' % m 304 menuLabel = m.label.strip('&') 305 print 'm.label = [%s], menuLabel = [%s]' % (m.label, menuLabel) 306 if m.name == aString: 307 print 'm.name == aString' 308 self.EnableTop(i, aBoolean) 309 break 310 for mi in m.items: 311 print 'mi is now [%s]' % mi 312 if mi.name == aString: 313 print 'mi.name == aString, menuLabel = [%s]' % menuLabel 314 id = self.FindMenuItem(menuLabel, mi.label) 315 print 'found menu id [%s]' % id 316 self.Enable(id, aBoolean) 317 break 318 i += 1 When I run with this code, my output is: m.label = [&File], menuLabel = [File] mi is now [MenuItem={'_listeners': [<PythonCardPrototype.dispatch.EventDispatch instance at 0x87d3d6c>], 'checked': 0, 'name': 'menuFileNew', 'this': '_783a7d08_p_wxMenuItem', 'checkable': 0, 'thisown': 1, 'enabled': 1, 'command': None, 'label': '&New...\tCtrl+N'}] mi is now [MenuItem={'_listeners': [<PythonCardPrototype.dispatch.EventDispatch instance at 0x87d4e14>], 'checked': 0, 'name': 'menuFileOpen', 'this': '_90587d08_p_wxMenuItem', 'checkable': 0, 'thisown': 1, 'enabled': 1, 'command': None, 'label': '&Open...\tCtrl+O'}] mi is now [MenuItem={'_listeners': [<PythonCardPrototype.dispatch.EventDispatch instance at 0x87d592c>], 'checked': 0, 'name': 'menuFileSave', 'this': '_585d7d08_p_wxMenuItem', 'checkable': 0, 'thisown': 1, 'enabled': 1, 'command': None, 'label': 'Save\tCtrl+S'}] mi is now [MenuItem={'_listeners': [<PythonCardPrototype.dispatch.EventDispatch instance at 0x87d5ffc>], 'checked': 0, 'name': 'menuFileSaveAs', 'this': '_10627d08_p_wxMenuItem', 'checkable': 0, 'thisown': 1, 'enabled': 1, 'command': None, 'label': 'Save &As...'}] mi is now [MenuItem={'_listeners': [<PythonCardPrototype.dispatch.EventDispatch instance at 0x87d647c>], 'checked': 0, 'name': 'menuFileRevert', 'this': '_d06e7d08_p_wxMenuItem', 'checkable': 0, 'thisown': 1, 'enabled': 1, 'command': None, 'label': 'Revert'}] mi is now [MenuItem={'_listeners': [<PythonCardPrototype.dispatch.EventDispatch instance at 0x87d6e8c>], 'checked': 0, 'name': 'fileSep1', 'this': '_08747d08_p_wxMenuItem', 'checkable': 0, 'thisown': 1, 'enabled': 1, 'command': None, 'label': '-'}] mi is now [MenuItem={'_listeners': [<PythonCardPrototype.dispatch.EventDispatch instance at 0x87d7604>], 'checked': 0, 'name': 'menuFileRun', 'this': '_08787d08_p_wxMenuItem', 'checkable': 0, 'thisown': 1, 'enabled': 1, 'command': 'fileRun', 'label': '&Run\tCtrl+R'}] mi.name == aString, menuLabel = [File] found menu id [-1] Traceback (most recent call last): File "/usr/lib/python2.2/site-packages/PythonCardPrototype/binding.py", line 268, in dispatchOpenBackground self.scriptable.dispatch.eventOccurred( event.OpenBackgroundEvent( self.scriptable ) ) File "/usr/lib/python2.2/site-packages/PythonCardPrototype/dispatch.py", line 83, in eventOccurred handler.getFunction()(self._scriptable, nativeEvent) File "/usr/lib/python2.2/site-packages/PythonCardPrototype/tools/resourceEditor/resourceEditor.py", line 134, in on_openBackground self.updatePanel(self.rsrc) File "/usr/lib/python2.2/site-packages/PythonCardPrototype/tools/resourceEditor/resourceEditor.py", line 1243, in updatePanel self.menuBar.setEnabled('menuFileRun', 1) File "/usr/lib/python2.2/site-packages/PythonCardPrototype/menu.py", line 316, in setEnabled self.Enable(id, aBoolean) File "/usr/lib/python2.2/site-packages/wx/core.py", line 7602, in Enable return _core.MenuBar_Enable(*args, **kwargs) wx.core.PyAssertionError: C++ assertion "wxAssertFailure" failed in ../src/common/menucmn.cpp(896): attempt to enable an item which doesn't exist I've tried some of the other samples (proof, addresses, etc) and these run without any problems, it looks like its just the resource editor in this case. -- Regards Phil Edwards Brighton, UK |
From: Kevin A. <al...@se...> - 2004-04-07 17:30:46
|
Son of a... I'm pretty sure I know what is going on. On the Mac I found that the =20 '&' in the menu label was causing FindMenuItem to fail. Here's the =20 explanation I sent Robin, Stefan, etc. """ Well as usual my earlier assumption was wrong about where the bug was =20= which a sample cleared up. It isn't the reference to the menubar that =20= is the problem it is wxMenuBar::FindMenuItem method. As far as I can =20 tell, unless you remove the ampersand from the menu name, then on the =20= Mac the search will always fail and return -1. It doesn't seem to =20 matter if you leave the ampersand in for the menu item name, only the =20= menu. For example, FindMenuItem('File', '&New') and =20 FindMenuItem('File', 'New') are okay on the Mac, but =20 FindMenuItem('&File', 'New') will return -1. FindMenuItem on Windows =20 doesn't have this problem and I'm pretty sure it has always worked on =20= GTK as well. Note that FindMenu does not have a problem with an =20 ampersand in the name and as mentioned previously I don't think this =20 was broke prior to 2.5.1.0p8. You can fire up the PyShell on the Mac to confirm this. >>> mbar =3D shell.GetParent().GetMenuBar() >>> mbar.FindMenuItem('File', 'New ') 5002 >>> mbar.FindMenuItem('File', '&New ') 5002 >>> mbar.FindMenuItem('&File', '&New ') -1 =00>>> mbar.FindMenu('&File') 0 >>> mbar.FindMenu('File') 0 """ So I changed getMenuId, setChecked, and setEnabled in menu.py to strip =20= the '&' which works fine on Windows (wxPython 2.4.2.4 and wxPython =20 2.5.1.5) and Mac (wxPython 2.5.1.5), but of course I don't use Linux =20 and apparently nobody else was testing the samples and tools on Linux =20= which will tickle this particular bug: codeEditor, resourceEditor, =20 addresses, conversions, jabberChat, life, radioclient, slideshow, =20 turtle, webserver. Maybe GTK needs the & to make a match and =20 furthermore it is just wxPython 2.5.x that causes the problem. So, to verify this, simply comment out the lines menuLabel =3D =20 m.label.strip('&') and see if the problem goes away. If that's it =20 (FindMenuItem) then I'll have to do a workaround and do a 0.7.3.1 =20 release. ka On Apr 7, 2004, at 9:55 AM, Phil Edwards wrote: > On Wednesday 07 Apr 2004 12:22 pm, Phil Edwards wrote: >> >> I've got a hard drive problem on one of my machines - I've got =20 >> backups so >> it's an inconvenience as opposed to a major disaster, but it means =20= >> the new >> RPM's won't be ready until the end of today at the earliest. :-( > > Okay, back up and running, thank $DEITY for recordable DVD's.... > > Now, I have a problem with 0.7.3 when running with python 2.2.2 and =20= > wxPython > 2.5. I've installed 0.7.3 from the tarball and wxPython from the RPM = on > wxpython.org. > > When I run the resource editor from a command line prompt, I get this: > > -----begin----- > [phile@localhost phile]$ > /usr/lib/python2.2/site-packages/PythonCardPrototype/tools/=20 > resourceEditor/resourceEditor.py > Traceback (most recent call last): > File =20 > "/usr/lib/python2.2/site-packages/PythonCardPrototype/binding.py", =20 > line > 268, in dispatchOpenBackground > self.scriptable.dispatch.eventOccurred( event.OpenBackgroundEvent( > self.scriptable ) ) > File =20 > "/usr/lib/python2.2/site-packages/PythonCardPrototype/dispatch.py", > line 83, in eventOccurred > handler.getFunction()(self._scriptable, nativeEvent) > File > "/usr/lib/python2.2/site-packages/PythonCardPrototype/tools/=20 > resourceEditor/resourceEditor.py", > line 134, in on_openBackground > self.updatePanel(self.rsrc) > File > "/usr/lib/python2.2/site-packages/PythonCardPrototype/tools/=20 > resourceEditor/resourceEditor.py", > line 1243, in updatePanel > self.menuBar.setEnabled('menuFileRun', 1) > File "/usr/lib/python2.2/site-packages/PythonCardPrototype/menu.py", = =20 > line > 309, in setEnabled > self.Enable(id, aBoolean) > File "/usr/lib/python2.2/site-packages/wx/core.py", line 7602, in =20= > Enable > return _core.MenuBar_Enable(*args, **kwargs) > wx.core.PyAssertionError: C++ assertion "wxAssertFailure" failed in > ../src/common/menucmn.cpp(896): attempt to enable an item which =20 > doesn't exist > > ------end------ > > The problem is that at line 309 (line 316 in the code below) of =20 > menu.py, the > value of 'id' is set to -1 when it tries to call self.Enable(). As far = =20 > as I > can see, the code in this part of menu.py hasn't changed between 0.7.2 = =20 > and > 0.7.3, so I'm stumped as to what's going on. I put a bunch of print > statements into menu.py so it looks like this: > > 299 def setEnabled( self, aString, aBoolean=3D1) : > 300 print 'setEnabled, aString =3D [%s], aBoolean =3D [%s]' % =20= > (aString, > aBoolean) > 301 i =3D 0 > 302 for m in self.menus: > 303 print 'm is now [%s]' % m > 304 menuLabel =3D m.label.strip('&') > 305 print 'm.label =3D [%s], menuLabel =3D [%s]' % = (m.label, =20 > menuLabel) > 306 if m.name =3D=3D aString: > 307 print 'm.name =3D=3D aString' > 308 self.EnableTop(i, aBoolean) > 309 break > 310 for mi in m.items: > 311 print 'mi is now [%s]' % mi > 312 if mi.name =3D=3D aString: > 313 print 'mi.name =3D=3D aString, menuLabel =3D = [%s]' % > menuLabel > 314 id =3D self.FindMenuItem(menuLabel, mi.label) > 315 print 'found menu id [%s]' % id > 316 self.Enable(id, aBoolean) > 317 break > 318 i +=3D 1 > > When I run with this code, my output is: > > m.label =3D [&File], menuLabel =3D [File] > mi is now [MenuItem=3D{'_listeners': > [<PythonCardPrototype.dispatch.EventDispatch instance at 0x87d3d6c>], > 'checked': 0, 'name': 'menuFileNew', 'this': '_783a7d08_p_wxMenuItem', > 'checkable': 0, 'thisown': 1, 'enabled': 1, 'command': None, 'label': > '&New...\tCtrl+N'}] > mi is now [MenuItem=3D{'_listeners': > [<PythonCardPrototype.dispatch.EventDispatch instance at 0x87d4e14>], > 'checked': 0, 'name': 'menuFileOpen', 'this': = '_90587d08_p_wxMenuItem', > 'checkable': 0, 'thisown': 1, 'enabled': 1, 'command': None, 'label': > '&Open...\tCtrl+O'}] > mi is now [MenuItem=3D{'_listeners': > [<PythonCardPrototype.dispatch.EventDispatch instance at 0x87d592c>], > 'checked': 0, 'name': 'menuFileSave', 'this': = '_585d7d08_p_wxMenuItem', > 'checkable': 0, 'thisown': 1, 'enabled': 1, 'command': None, 'label': > 'Save\tCtrl+S'}] > mi is now [MenuItem=3D{'_listeners': > [<PythonCardPrototype.dispatch.EventDispatch instance at 0x87d5ffc>], > 'checked': 0, 'name': 'menuFileSaveAs', 'this': =20 > '_10627d08_p_wxMenuItem', > 'checkable': 0, 'thisown': 1, 'enabled': 1, 'command': None, 'label': =20= > 'Save > &As...'}] > mi is now [MenuItem=3D{'_listeners': > [<PythonCardPrototype.dispatch.EventDispatch instance at 0x87d647c>], > 'checked': 0, 'name': 'menuFileRevert', 'this': =20 > '_d06e7d08_p_wxMenuItem', > 'checkable': 0, 'thisown': 1, 'enabled': 1, 'command': None, 'label': > 'Revert'}] > mi is now [MenuItem=3D{'_listeners': > [<PythonCardPrototype.dispatch.EventDispatch instance at 0x87d6e8c>], > 'checked': 0, 'name': 'fileSep1', 'this': '_08747d08_p_wxMenuItem', > 'checkable': 0, 'thisown': 1, 'enabled': 1, 'command': None, 'label': =20= > '-'}] > mi is now [MenuItem=3D{'_listeners': > [<PythonCardPrototype.dispatch.EventDispatch instance at 0x87d7604>], > 'checked': 0, 'name': 'menuFileRun', 'this': '_08787d08_p_wxMenuItem', > 'checkable': 0, 'thisown': 1, 'enabled': 1, 'command': 'fileRun', =20 > 'label': > '&Run\tCtrl+R'}] > mi.name =3D=3D aString, menuLabel =3D [File] > found menu id [-1] > Traceback (most recent call last): > File =20 > "/usr/lib/python2.2/site-packages/PythonCardPrototype/binding.py", =20 > line > 268, in dispatchOpenBackground > self.scriptable.dispatch.eventOccurred( event.OpenBackgroundEvent( > self.scriptable ) ) > File =20 > "/usr/lib/python2.2/site-packages/PythonCardPrototype/dispatch.py", > line 83, in eventOccurred > handler.getFunction()(self._scriptable, nativeEvent) > File > "/usr/lib/python2.2/site-packages/PythonCardPrototype/tools/=20 > resourceEditor/resourceEditor.py", > line 134, in on_openBackground > self.updatePanel(self.rsrc) > File > "/usr/lib/python2.2/site-packages/PythonCardPrototype/tools/=20 > resourceEditor/resourceEditor.py", > line 1243, in updatePanel > self.menuBar.setEnabled('menuFileRun', 1) > File "/usr/lib/python2.2/site-packages/PythonCardPrototype/menu.py", = =20 > line > 316, in setEnabled > self.Enable(id, aBoolean) > File "/usr/lib/python2.2/site-packages/wx/core.py", line 7602, in =20= > Enable > return _core.MenuBar_Enable(*args, **kwargs) > wx.core.PyAssertionError: C++ assertion "wxAssertFailure" failed in > ../src/common/menucmn.cpp(896): attempt to enable an item which =20 > doesn't exist > > I've tried some of the other samples (proof, addresses, etc) and these = =20 > run > without any problems, it looks like its just the resource editor in =20= > this > case. > > --=20 > > Regards > > Phil Edwards > Brighton, UK > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcl= ick > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > |
From: Kevin A. <al...@se...> - 2004-04-07 18:02:41
|
On Apr 7, 2004, at 10:30 AM, Kevin Altis wrote: > So, to verify this, simply comment out the lines menuLabel = > m.label.strip('&') and see if the problem goes away. If that's it > (FindMenuItem) then I'll have to do a workaround and do a 0.7.3.1 > release. > Oops, that should have been, replace menuLabel = m.label.strip('&') with menuLabel = m.label The diff in cvs... http://cvs.sourceforge.net/viewcvs.py/pythoncard/PythonCardPrototype/ menu.py?r1=text&tr1=1.22&r2=text&tr2=1.24&diff_format=h ka |
From: Kevin A. <al...@se...> - 2004-04-07 21:57:14
|
Sadly, the problem was related but much more critical and we definitely have to do a 0.7.3.1 release for Linux/GTK. I have checked in a potential fix for menu.py. Rowland has checked it with 2.4.2.4 and 2.5.1.5 and we think it works. I haven't seen problems with Windows or Mac either, but I want to do more testing. Anyway, the problem is that FindMenuItem on GTK doesn't actually strip the tab and characters after the tab in a menu item label string so something like "E&xit\tAlt+x" will never get a match on GTK, so it always returns an id of -1. My menu.py code was faulty for not checking for a -1 return value from FindMenuItem. In wxPython 2.4.x you could pass an id of -1 to Enable, Check, etc. and the methods would just fail silently, but since I wasn't running GTK I never thought to check this. In 2.5.1.5 they throw an assert when you pass invalid ids like -1 which is the error Phil reported. Basically, the menu code for enabling and checking menu items has always been broken on GTK when the menu item labels contained a \t... for defining a key equivalent like Alt+X, Ctrl+C, etc. So, I've brought this up on wxPython-dev and I think I've fixed the problem in cvs, but we need to do more testing to make sure the code works correctly on all platforms with both 2.4.2.4 and 2.5.1.5 before doing a 0.7.3.1 release. There is an unrelated complication in that it appears the resourceEditor dragging and resizing code isn't working correctly with wxPython 2.5.1.5 on GTK either. More on this later. ka On Apr 7, 2004, at 11:02 AM, Kevin Altis wrote: > On Apr 7, 2004, at 10:30 AM, Kevin Altis wrote: > >> So, to verify this, simply comment out the lines menuLabel = >> m.label.strip('&') and see if the problem goes away. If that's it >> (FindMenuItem) then I'll have to do a workaround and do a 0.7.3.1 >> release. >> > Oops, that should have been, replace > > menuLabel = m.label.strip('&') > > with > > menuLabel = m.label > > The diff in cvs... > > http://cvs.sourceforge.net/viewcvs.py/pythoncard/PythonCardPrototype/ > menu.py?r1=text&tr1=1.22&r2=text&tr2=1.24&diff_format=h > > ka |