I have a C++ wxWidgets app which also tries to capture the mouse on OS
X, and it doesn't work there with CVS head either. I'm waiting and
hoping a future release fixes it.
-Jim
···
On Mon, 14 Feb 2005 22:39:26 +0530, danielle@davout.org <danielle@davout.org> wrote:
under windows Xp, it seems to work and suddenly ..
release
motion
release
Traceback (most recent call last):
File "C:\PythonRen\projet3\Script1.py", line 20, in OnMouseUp
s.GetTopWindow().ReleaseMouse()
File "C:\Python23\Lib\site-packages\wx\_core.py", line 6769, in
ReleaseMouse
return _core_.Window_ReleaseMouse(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "GetCapture() == this" failed
in ..\..\src\common\wincmn.cpp(2318): attempt to release mouse, but this
window hasn't captured it
motion
motion
motion
moStéphane Conversy a écrit :
> Hello.
>
> does CaptureMouse work on MacOSX ?
> the following code should display "motion" even when dragging outside
> the main window, but it doesn't...
>
>
> import wx
> class MyApp(wx.App):
> def OnInit(s):
> frame = wx.Frame(None, -1, "sauvage")
> frame.Show(1)
> frame.SetSize(wx.Size(500,500))
>
> frame.Bind(wx.EVT_LEFT_DOWN, s.OnMouseDown)
> frame.Bind(wx.EVT_LEFT_UP, s.OnMouseUp)
> frame.Bind(wx.EVT_MOTION, s.OnMouseMotion)
> s.frame = frame
> return True
>
> def OnMouseDown(s, evt):
> print "capture"
> s.GetTopWindow().CaptureMouse()
>
> def OnMouseUp(s, evt):
> print "release"
> s.GetTopWindow().ReleaseMouse()
>
> def OnMouseMotion(s, evt):
> print "motion"
>
>
> app = MyApp()
> app.MainLoop()
>
>
> --
> stéphane conversy
> http://www.tls.cena.fr/~conversy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
>
>
>---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org