From: Alex T. <al...@tw...> - 2004-08-12 12:29:43
|
At 10:31 10/08/2004 -0700, Kevin Altis wrote: >The two issues I want comments on are whether to leave the BitmapCanvas >draw operations as separate x, y and width, height args or to use tuples >(x, y) and (width, height). What's in cvs right now are tuple versions, >but since wxPython switched back to separate args after the 2.5.1.5 >outcry, my inclination on odd days is to go ahead and switch back as well >since it matches the wxPython arg list and is probably simpler for people >to remember. On even days I think using tuples is more consistent since it >matches the init args for components, but the wxPython API uses both forms >for a lot of different methods. As a brief example, here's drawLine as >used in the doodle sample with separate args followed by tuple args. If >nobody replies I'll go ahead and revert all the sample, BitmapCanvas, etc. >before 0.8 is released. > >event.target.drawLine(self.x, self.y, x, y) > >event.target.drawLine((self.x, self.y), (x, y)) No big deal either way - I'd go with the same as wxPython; the easier it is to slip past Pythoncard into wxPython (when necessary) the better. >The second issue is that for a long time I've been thinking about just >using the wx.lib.dialogs function wrappers for system dialogs instead of >the ones in PythonCard.dialog. I wrote most of the code in wx.lib.dialogs >last year, so it has the same goal as the current PythonCard dialog code, >which is to make all system dialogs function calls. However, the arg lists >are changed, mostly for the better, and the result is a class instead of a >dict. What I plan to do is leave the PythonCard.dialog module in place, >but just import the appropriate functions from wx.lib.dialogs or provide >thin wrappers where PythonCard still needs some special handling such as >the result returned by the fontDialog. This change will impact every >sample and tool that uses system dialogs as well as the documentation Dan >Shafer wrote, so I don't want to switch if everyone is going to complain >and I have to switch all the code back. Again, if there aren't a lot of >dissents, I'll make the change later this week. Anyone that is interested >in the changes, should just look at the wx.lib.dialogs.py code in wxPython >2.4.2.4 or later. Any chance you could provide a simple "what the code looks like before and after" example to make it easier to have an opinion on this one ? Thanks -- Alex Tweedly. |