From: Steven P. <n9...@n9...> - 2004-04-20 03:42:58
|
On Apr 19, 2004, at 10:11 PM, Roger Binns wrote: > However there are a large number of wx object methods where > parameters have changed, typically from individual parameters > into tuples. There is no way to write the code so that it > works on both wx 2.4 and 2.5 in one line. It would have to > look like this instead: > > if wx.VERSION>=(2,5): > sizer.Add( (10,10), 0, wx.EXPAND) > else: > sizer.Add( 10, 10, 0, wx.EXPAND) ...Interesting. I did read through the migration docs, and even asked about it specifically on the mailing list. The answer I got was: [QUOTED REPLY] > For my own application, the only change I needed to make when moving > to 2.5 was to use tuples instead of two separate arguments when adding > empty space to a sizer, and that change was backwards compatible with > 2.4 so the updated code works on both versions without any > version-specific code. It's a few thousand lines of code so it's a > sizable app. Of course, YMMV, so I would recommend you read the > Migration Guide to see if any of the backwards-incompatible changes > are an issue for you first. So, in his case it seemed as though changing to use tuples did not break 2.4... Did you try this in the instances you were looking at? I haven't toyed with it at all, so I thought I'd ask first. No, Roger, I'm not assuming you're an idiot and didn't try it, I'm just asking. :-) All in all, I'm not in any hurry (any longer) to move to 2.5, and I'm working on setting up both sets of libraries/includes here with scripts to move me back and forth between them. The project I was working on that *required* 2.5 is on a back back burner now, so I could care less when we move. ;-) Just my $0.02. |