|
From: Rowland S. <mon...@us...> - 2004-05-02 16:31:44
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13034 Modified Files: event.py Log Message: Added Handler.execute() method. This will be used when we move to Component inheriting from Scriptable, and puts the responsibility for executing a handler on the Scriptable object, as opposed to EventDispatch getting the handler from the Scriptable and then calling it. This method currently is being used in experimental code that we will eventually switch over to. Index: event.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/event.py,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** event.py 1 May 2004 18:47:50 -0000 1.61 --- event.py 2 May 2004 16:31:33 -0000 1.62 *************** *** 10,13 **** --- 10,14 ---- import wx + class Handler: """ *************** *** 48,53 **** --- 49,69 ---- def getFunction( self ) : + """ + RDS - 2004-05-02 + Once we've switched to the new component.Scriptable + design, remove this method and all references to it. + """ return self._function + def execute( self, target, event ) : + """ + RDS - 2004-05-02 + Added to support new Scriptable design in + component.Scriptable. Ask the Handler to + execute itself instead of getting it's + function and calling it. + """ + self._function( target, event ) + def __repr__( self ) : return str( self.__dict__ ) *************** *** 83,86 **** --- 99,103 ---- return self._oldValue + class ChangeListener : """ |