Re: Agide and wxPython 2.5.2.7: another patch proposed
CH <[email protected]> Sat, 28 Aug 2004 16:46:49 +0300
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
The next problem when doing the tutorial under linux and wxPython
2.5.2.7 occurs with the grep dialog:
In GrepToolWindow, def _init_coll_grepmenu_Items
the lines
parent.Append(helpString='',
id=wxID_GREPTOOLWINDOWGREPMENUSEARCHAGAIN, item='Search again')
throw an exception:
File "/home/che/lib/aap/Agide/Tools/GrepToolUtil/GrepToolWindow.py",
line 25, in _init_coll_grepmenu_Items
id=wxID_GREPTOOLWINDOWGREPMENUSEARCHAGAIN, item='Search again')
File "/usr/lib/python2.3/site-packages/wx/_core.py", line 7776, in Append
return _core_.Menu_Append(*args, **kwargs)
TypeError: Menu_Append() takes at least 3 arguments (2 given)
The reason for this being obviously that the keyword "item" is not
accepted any more, it was changed to the keyword "text" in wxMenu.Append
However I suppose in wxPython 2.4.x "text" will be not accepted, so the
proposed solution is avoiding the keywords altogether, like in the patch
below.
--- ../../../Agide-original/Tools/GrepToolUtil/GrepToolWindow.py
2003-04-20 14:12:30.000000000 +0300
+++ GrepToolWindow.py 2004-08-28 16:31:40.000000000 +0300
@@ -21,13 +21,11 @@
class GrepToolWindow(wxFrame):
def _init_coll_grepmenu_Items(self, parent):
- parent.Append(helpString='',
- id=wxID_GREPTOOLWINDOWGREPMENUSEARCHAGAIN, item='Search
again')
+ parent.Append(wxID_GREPTOOLWINDOWGREPMENUSEARCHAGAIN, 'Search
again')
EVT_MENU(self, wxID_GREPTOOLWINDOWGREPMENUSEARCHAGAIN,
self.OnGrepmenuSearchAgain)
- parent.Append(helpString='',
- id=wxID_GREPTOOLWINDOWGREPMENUCLOSE,
item='Close')
+ parent.Append(wxID_GREPTOOLWINDOWGREPMENUCLOSE, 'Close')
EVT_MENU(self, wxID_GREPTOOLWINDOWGREPMENUCLOSE,
self.OnGrepmenuClose)
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click