Re: Agide and wxPython 2.5.2.7- 3 patches
CH <[email protected]> Sun, 29 Aug 2004 00:27:54 +0300
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
Bram Moolenaar wrote:
> The "if" solution is cleaner. Exceptions are to be used for, well,
> exceptions. It's a way out when if/then/else doesn't work.
>
now, I have made three patches for the files GUITop.py, DebugTool.py and
NavTree.py. I append them below, hopefully they work with 2.4.x as well.
For me all steps of the tutorial work now with 2.5.2.7 under Linux.
-----------------------------------------------------------------
1. patch:
-----------------------------------------------------------------
--- original/NavTree.py 2004-06-09 14:05:14.000000000 +0300
+++ NavTree.py 2004-08-28 23:56:55.000000000 +0300
@@ -285,7 +285,10 @@
if self.GetPyData(item) == actyitem:
return item
cookie = 0
- child, cookie = self.GetFirstChild(item, cookie)
+ if wxVERSION_STRING < "2.5":
+ child, cookie = self.GetFirstChild(item, cookie)
+ else:
+ child, cookie = self.GetFirstChild(item)
while child.IsOk():
i = self.findActyItemRec(actyitem, child)
if i:
------------------------------------------------------------------
2. patch:
------------------------------------------------------------------
--- original/DebugTool.py 2004-06-09 14:06:06.000000000 +0300
+++ DebugTool.py 2004-08-28 23:50:07.000000000 +0300
@@ -212,7 +212,7 @@
def _init_coll_debugmenu_Items(self, parent):
id = wxNewId()
- parent.Append(helpString = '', id = id, item = 'Close')
+ parent.Append(id, 'Close')
EVT_MENU(self, id, self.OnDebugmenuClose)
def _init_utils(self):
------------------------------------------------------------------
3. patch:
------------------------------------------------------------------
--- original/GUItop.py 2004-08-29 00:11:03.000000000 +0300
+++ GUItop.py 2004-08-28 23:40:36.000000000 +0300
@@ -263,15 +263,27 @@
EVT_BUTTON(dlg, id, self.OnDialogButton)
# Add a spacer between buttons.
if i + 1 < len(choices):
- hbox.Add(20, 20, 0, wxEXPAND)
+ if wxVERSION_STRING < "2.5":
+ hbox.Add(20, 20, 0, wxEXPAND)
+ else:
+ hbox.Add((20,20), 0, wxEXPAND)
# Put the message and the row of buttons in a vertical sizer.
vbox = wxBoxSizer(wxVERTICAL)
- vbox.Add(0, 0, 1)
+ if wxVERSION_STRING < "2.5":
+ vbox.Add(0, 0, 1)
+ else:
+ vbox.Add((0, 0), 1)
vbox.Add(wxStaticText(dlg, 1, msg), 1, wxALIGN_CENTER)
- vbox.Add(0, 0, 1)
+ if wxVERSION_STRING < "2.5":
+ vbox.Add(0, 0, 1)
+ else:
+ vbox.Add((0, 0), 1)
vbox.Add(hbox, 0, wxALIGN_CENTER)
- vbox.Add(0, 0, 1)
+ if wxVERSION_STRING < "2.5":
+ vbox.Add(0, 0, 1)
+ else:
+ vbox.Add((0, 0), 1)
if def_but:
# Apprently this doesn't work, hitting return always uses
the first
-------------------------------------------------------
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