Re: Bug in sash drag
Eric Fahlgren <[email protected]>
| Newsgroups | gmane.comp.python.wxpython.devel |
|---|---|
| Message-ID | <CAP2Qz+UNFNV4X7fDo0NjczsfKtpEtBRoCX3XG8f1C4aoEVtwvw@mail.gmail.com> |
Excellent. Probably easier than chasing all the formerly-bad python calls down... On Sat, Apr 16, 2016 at 5:41 PM, Scott Talbert <[email protected]> wrote: > OK, so I tried adding the overload for ScreenToClient/ClientToScreen back > in and it seems to work OK (after a little tweaking). I'll submit a PR. > > Scott > > > On Tue, 12 Apr 2016, Eric Fahlgren wrote: > > Seems odd as there are only two signatures for it (and its converse: >> "Point" >> and "int*,int*"), so it seems like it should work. I haven't used SIP for >> like 15 years so I'm probably missing something obvious. >> In any case, are there any committers around here that could put that >> patch >> in the base? >> >> A quick grep for ScreenToClient/ClientToScreen shows another dozen places >> that will generate the same error: >> >> venv/Lib/site-packages/wx/lib/agw/ultimatelistctrl.py: return >> self._mainWin.ClientToScreen(x, y) >> venv/Lib/site-packages/wx/lib/gridmovers.py: x,y = >> self.lwin.ClientToScreen(evt.X,0) >> venv/Lib/site-packages/wx/lib/gridmovers.py: px,py = >> self.lwin.ClientToScreen(evt.X,evt.Y) >> venv/Lib/site-packages/wx/lib/gridmovers.py: px = >> self.lwin.ClientToScreen(self.startX,0)[0] >> venv/Lib/site-packages/wx/lib/gridmovers.py: x,y = >> self.lwin.ClientToScreen(0,evt.Y) >> venv/Lib/site-packages/wx/lib/gridmovers.py: px,py = >> self.lwin.ClientToScreen(evt.X,evt.Y) >> venv/Lib/site-packages/wx/lib/gridmovers.py: py = >> self.lwin.ClientToScreen(0,self.startY)[1] >> >> venv/Lib/site-packages/wx/lib/agw/ultimatelistctrl.py: return >> self._mainWin.ScreenToClient(x, y) >> venv/Lib/site-packages/wx/lib/gridmovers.py: x,y = >> self.grid.ScreenToClient(x,y) >> venv/Lib/site-packages/wx/lib/gridmovers.py: px,py = >> self.grid.ScreenToClient(px,py) >> venv/Lib/site-packages/wx/lib/gridmovers.py: px = >> self.grid.ScreenToClient(px,0)[0] >> venv/Lib/site-packages/wx/lib/gridmovers.py: x,y = >> self.grid.ScreenToClient(x,y) >> venv/Lib/site-packages/wx/lib/gridmovers.py: px,py = >> self.grid.ScreenToClient(px,py) >> venv/Lib/site-packages/wx/lib/gridmovers.py: py = >> self.grid.ScreenToClient(0,py)[1] >> >> >> On Tue, Apr 12, 2016 at 10:36 AM, Scott Talbert <[email protected]> wrote: >> On Tue, 12 Apr 2016, Eric Fahlgren wrote: >> >> Attempting to drag a sash splitter in an AUI window >> gives this: >> Traceback (most recent call last): >> File "venv/lib/site-packages/wx/lib/splitter.py", >> line 437, in _OnMouse >> self._DrawSashTracker(self._oldX, self._oldY) >> File "venv/lib/site-packages/wx/lib/splitter.py", >> line 701, in >> _DrawSashTracker >> x1, y1 = self.ClientToScreen(x1, y1) >> TypeError: Window.ClientToScreen(): argument 1 has >> unexpected type 'int' >> >> I have a simple hack that fixes it (put parens >> around x1,y1 to make it a >> tuple, repeat also on line 702), but is this a >> missing overload on >> ClientToScreen? It seems likely that it should it >> really accept a pair of >> ints in addition to "point" objects... >> >> Using Py 2.7.11 x64, Phoenix 3.0.3.dev1964+f780b21 >> (build from 2016-04-09, >> so only a couple days old). >> >> >> It looks like the overload is missing on purpose: >> https://github.com/wxWidgets/Phoenix/blob/master/etg/window.py#L70 >> >> Scott >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "wxPython-dev" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> >> -- You received this message because you are subscribed to the Google Groups "wxPython-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.