From: Kevin A. <ka...@us...> - 2004-05-02 19:56:26
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24188 Modified Files: widget.py Log Message: fixed boundEvents reference Index: widget.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/widget.py,v retrieving revision 1.120 retrieving revision 1.121 diff -C2 -d -r1.120 -r1.121 *** widget.py 2 May 2004 19:49:57 -0000 1.120 --- widget.py 2 May 2004 19:56:16 -0000 1.121 *************** *** 256,260 **** # helper variable to simplify test for whether to bind InsteadOfTypeEvents ! boundEvents = {} self.eventIdToHandler = {} --- 256,263 ---- # helper variable to simplify test for whether to bind InsteadOfTypeEvents ! # there is a good chance we will need to know ! # which events are bound, if we want to dynamically add or remove ! # events later, so go ahead and keep a reference to the list ! self.boundEvents = {} self.eventIdToHandler = {} *************** *** 312,318 **** # and that is inserted into boundEvents, then we check boundEvents # prior to rebinding? ! if not boundEvents.get(eventClass.binding, None): self.Bind(eventClass.binding, self._dispatch) ! boundEvents[eventClass.binding] = eventClass.name if handler: if 0: --- 315,321 ---- # and that is inserted into boundEvents, then we check boundEvents # prior to rebinding? ! if not self.boundEvents.get(eventClass.binding, None): self.Bind(eventClass.binding, self._dispatch) ! self.boundEvents[eventClass.binding] = eventClass.name if handler: if 0: *************** *** 322,326 **** if 0: print "\n boundEvents:" ! for name in boundEvents.values(): print " ", name print "\n\n" --- 325,329 ---- if 0: print "\n boundEvents:" ! for name in self.boundEvents.values(): print " ", name print "\n\n" *************** *** 329,336 **** print " ", id, self.eventIdToHandler[id]._function print "\n\n" - # there is a good chance we will need to know - # which events are bound, if we want to dynamically add or remove - # events later, so go ahead and keep a reference to the list - self.boundEvents = boundEvents def _dispatch(self, aWxEvent): --- 332,335 ---- |