I've been working with wxPython 2.4.2.4 on Linux, and today
decided to try running my code as-is on Windows NT4 with
wxPython 2.4.2.4.
Well... it kind of runs, but some oddities I've noticed so far:
1) event handler for a menu item:
def OnFileOpen(self, event):
print event.GetEventObject()
On Linux, this outputs the menu item instance, as expected:
<mainMenu.FileOpenMenu instance; proxy of C++ wxMenu instance at _8394f78_wxMenu_p>
while on Windows, the output is the MainFrame instance:
<daboApp.MainFrame instance; proxy of C++ wxMDIParentFrame instance at _7f1830_wxMDIParentFrame_p>
2) location of event.Skip() matters under Windows:
I have a wx.Notebook subclass, with an OnPageChanged event
handler. Under Linux, I did my stuff, and then called event.Skip().
Under Windows, I found I needed to move event.Skip() to the
top of the method, before calls such as: event.GetSelection(), or
various Assertion errors would occur.
3) I have a wx.Grid on a page in a notebook that works beautifully
in Linux, but on Windows it paints and then disappears. If I
change pages, I can see the grid flash into view before the page
changes. I haven't played around too much with this yet.
I guess my question now is: is there a recommended approach
to multi-platform development? Is there a "lowest common
denomenator" platform to develop on? Do I have to worry
about wx behaving wildly differently on the different flavors
of Windows, or just wildly differently when crossing the
major platforms of Mac/Linux/Windows?
I'm going to test my app on OSX this evening as well...
I'd prefer to develop on Linux but would like to know what
steps I can take now to minimize the tweaking that will need to
happen later to keep the app running on all platforms. I'm
just a one-man shop so I'm not going to be able to test on
all platforms and flavors every time I make a modification.
I'm looking for both general tips, as well as specific examples,
so if you have experience deploying your wxPython apps
to different platforms, please don't be shy!
···
--
Paul