]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/newevent.py
don't clear the tooltip unless there is one.
[wxWidgets.git] / wxPython / wx / lib / newevent.py
index a6c828d919dc443cc1166d604ea124677da08be8..72aecaa25da096ad6d96465cb5a22e8ded921ff5 100644 (file)
@@ -1,7 +1,6 @@
-#!/usr/bin/env python
-"""Easy generation of new events classes and binder functions"""
+"""Easy generation of new events classes and binder objects"""
 
 
-__author__ = "Miki Tebeka <tebeka@cs.bgu.ac.il>"
+__author__ = "Miki Tebeka <miki.tebeka@gmail.com>"
 
 import wx
 
 
 import wx
 
@@ -19,10 +18,7 @@ def NewEvent():
             self.SetEventType(evttype)
             self.__dict__.update(kw)
 
             self.SetEventType(evttype)
             self.__dict__.update(kw)
 
-    def Binder(win, func):
-        win.Connect(-1, -1, evttype, func)
-
-    return _Event, Binder
+    return _Event, wx.PyEventBinder(evttype)
 
 
 
 
 
 
@@ -37,10 +33,7 @@ def NewCommandEvent():
             wx.PyCommandEvent.__init__(self, evttype, id)
             self.__dict__.update(kw)
     
             wx.PyCommandEvent.__init__(self, evttype, id)
             self.__dict__.update(kw)
     
-    def Binder(win, id, func):
-        win.Connect(id, -1, evttype, func)
-
-    return _Event, Binder
+    return _Event, wx.PyEventBinder(evttype, 1)
 
 
 #---------------------------------------------------------------------------
 
 
 #---------------------------------------------------------------------------