X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d14a1e28567de23c586bc80017073d0c39f8d18f..c306c1e0f6c9e675aba8206f56cbf261d2506e41:/wxPython/wx/lib/newevent.py diff --git a/wxPython/wx/lib/newevent.py b/wxPython/wx/lib/newevent.py index a6c828d919..72aecaa25d 100644 --- a/wxPython/wx/lib/newevent.py +++ b/wxPython/wx/lib/newevent.py @@ -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 " +__author__ = "Miki Tebeka " import wx @@ -19,10 +18,7 @@ def NewEvent(): 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) - def Binder(win, id, func): - win.Connect(id, -1, evttype, func) - - return _Event, Binder + return _Event, wx.PyEventBinder(evttype, 1) #---------------------------------------------------------------------------