You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(45) |
May
(185) |
Jun
|
Jul
(36) |
Aug
(205) |
Sep
(98) |
Oct
(107) |
Nov
(6) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(1) |
Feb
(2) |
Mar
(19) |
Apr
(26) |
May
(18) |
Jun
|
Jul
(12) |
Aug
(16) |
Sep
(22) |
Oct
(7) |
Nov
(11) |
Dec
(74) |
2006 |
Jan
(14) |
Feb
(1) |
Mar
(3) |
Apr
(3) |
May
(14) |
Jun
(5) |
Jul
(20) |
Aug
(10) |
Sep
(1) |
Oct
|
Nov
(4) |
Dec
(1) |
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(14) |
Aug
|
Sep
|
Oct
(6) |
Nov
(1) |
Dec
|
From: Kevin A. <ka...@us...> - 2004-04-30 23:50:23
|
Update of /cvsroot/pythoncard/PythonCard/samples/companies In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7490/companies Modified Files: companies.py Log Message: fixed on_mouseUp event.skip bug Index: companies.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/companies/companies.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** companies.py 14 Apr 2004 02:38:48 -0000 1.11 --- companies.py 30 Apr 2004 23:50:06 -0000 1.12 *************** *** 35,38 **** --- 35,40 ---- if url.startswith('http://'): webbrowser.open(url) + else: + event.skip() |
From: Kevin A. <ka...@us...> - 2004-04-30 23:29:53
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3533 Modified Files: event.py Log Message: updated event classes with binding and id, new classes to support Button... Index: event.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/event.py,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** event.py 29 Apr 2004 23:59:23 -0000 1.56 --- event.py 30 Apr 2004 23:29:44 -0000 1.57 *************** *** 327,336 **** ! class GainFocusEvent( Event ) : name = 'gainFocus' ! class LoseFocusEvent( Event ) : name = 'loseFocus' --- 327,354 ---- ! # mixin for MouseClickEvent, SelectEvent ! # the classname can be changed, I just didn't want ! # to conflict with CommandEvent above ! class CommandTypeEvent: ! pass ! ! # mixin for RestoreEvent, DeactivateEvent, MouseDragEvent ! # CloseFieldEvent isn't virtual because ! # LoseFocus is still sent ! # probably need a better descriptor than "virtual" or "instead of" ! class InsteadOfTypeEvent: ! pass ! ! ! class GainFocusEvent(Event): name = 'gainFocus' + binding = wx.EVT_SET_FOCUS + id = wx.wxEVT_SET_FOCUS ! class LoseFocusEvent(Event): name = 'loseFocus' + binding = wx.EVT_KILL_FOCUS + id = wx.wxEVT_KILL_FOCUS *************** *** 355,359 **** ! class SelectEvent( Event ) : name = 'select' --- 373,377 ---- ! class SelectEvent(Event, CommandTypeEvent): name = 'select' *************** *** 395,403 **** class TimerEvent(Event): name = 'timer' ! class MouseClickEvent( Event ) : name = 'mouseClick' class ButtonMouseClickEvent( Event ) : name = 'mouseClick' --- 413,425 ---- class TimerEvent(Event): name = 'timer' + binding = wx.EVT_TIMER + id = wx.wxEVT_TIMER ! class MouseClickEvent(Event, CommandTypeEvent): name = 'mouseClick' + # obsolete transition test + # can be deleted later class ButtonMouseClickEvent( Event ) : name = 'mouseClick' *************** *** 406,462 **** command = True ! class MouseDoubleClickEvent( Event ) : name = 'mouseDoubleClick' ! class MouseDownEvent( Event ) : name = 'mouseDown' ! class MouseUpEvent( Event ) : name = 'mouseUp' ! class MouseMiddleDownEvent( Event ) : name = 'mouseMiddleDown' ! class MouseMiddleUpEvent( Event ) : name = 'mouseMiddleUp' ! class MouseMiddleDoubleClickEvent( Event ) : name = 'mouseMiddleDoubleClick' ! class MouseContextDownEvent( Event ) : name = 'mouseContextDown' ! class MouseContextUpEvent( Event ) : name = 'mouseContextUp' ! class MouseContextClickEvent( Event ) : ! name = 'mouseContextClick' ! class MouseContextDoubleClickEvent( Event ) : name = 'mouseContextDoubleClick' ! class MouseEnterEvent( Event ) : name = 'mouseEnter' ! class MouseLeaveEvent( Event ) : name = 'mouseLeave' ! class MouseMoveEvent( Event ) : name = 'mouseMove' ! class MouseDragEvent( Event ) : name = 'mouseDrag' ! class CalendarMouseDoubleClickEvent(Event): --- 428,509 ---- command = True ! class MouseDoubleClickEvent(Event): name = 'mouseDoubleClick' + binding = wx.EVT_LEFT_DCLICK + id = wx.wxEVT_LEFT_DCLICK ! class MouseDownEvent(Event): name = 'mouseDown' + binding = wx.EVT_LEFT_DOWN + id = wx.wxEVT_LEFT_DOWN ! class MouseUpEvent(Event): name = 'mouseUp' + binding = wx.EVT_LEFT_UP + id = wx.wxEVT_LEFT_UP ! class MouseMiddleDownEvent(Event): name = 'mouseMiddleDown' + binding = wx.EVT_MIDDLE_DOWN + id = wx.wxEVT_MIDDLE_DOWN ! class MouseMiddleUpEvent(Event): name = 'mouseMiddleUp' + binding = wx.EVT_MIDDLE_UP + id = wx.wxEVT_MIDDLE_UP ! class MouseMiddleDoubleClickEvent(Event): name = 'mouseMiddleDoubleClick' + binding = wx.EVT_MIDDLE_DCLICK + id = wx.wxEVT_MIDDLE_DCLICK ! class MouseContextDownEvent(Event): name = 'mouseContextDown' + binding = wx.EVT_RIGHT_DOWN + id = wx.wxEVT_RIGHT_DOWN ! class MouseContextUpEvent(Event): name = 'mouseContextUp' + binding = wx.EVT_RIGHT_UP + id = wx.wxEVT_RIGHT_UP ! ##class MouseContextClickEvent( Event ) : ! ## name = 'mouseContextClick' ! class MouseContextDoubleClickEvent(Event): name = 'mouseContextDoubleClick' + binding = wx.EVT_RIGHT_DCLICK + id = wx.wxEVT_RIGHT_DCLICK ! class MouseEnterEvent(Event): name = 'mouseEnter' + binding = wx.EVT_ENTER_WINDOW + id = wx.wxEVT_ENTER_WINDOW ! class MouseLeaveEvent(Event): name = 'mouseLeave' + binding = wx.EVT_LEAVE_WINDOW + id = wx.wxEVT_LEAVE_WINDOW ! class MouseMoveEvent(Event): name = 'mouseMove' + binding = wx.EVT_MOTION + id = wx.wxEVT_MOTION ! class MouseDragEvent(Event, InsteadOfTypeEvent): name = 'mouseDrag' ! binding = wx.EVT_MOTION ! id = wx.NewEventType() class CalendarMouseDoubleClickEvent(Event): *************** *** 541,544 **** --- 588,614 ---- ] + NEW_MOUSE_EVENTS = ( + MouseDoubleClickEvent, + MouseDownEvent, + MouseUpEvent, + MouseMiddleDownEvent, + MouseMiddleUpEvent, + MouseMiddleDoubleClickEvent, + MouseContextDownEvent, + MouseContextUpEvent, + MouseContextDoubleClickEvent, + MouseEnterEvent, + MouseLeaveEvent, + MouseMoveEvent, + MouseDragEvent, + ) + + FOCUS_EVENTS = ( + GainFocusEvent, + LoseFocusEvent, + ) + + WIDGET_EVENTS = NEW_MOUSE_EVENTS + FOCUS_EVENTS + (TimerEvent,) + # System Events *************** *** 553,668 **** class CloseFieldEvent(Event): name = 'closeField' - ##class EventMap : - ## """ - ## Maps Event classes to handler names for use in user code, and vice-versa. - ## """ - ## def __init__( self ) : - ## - ## self._table = [ - ## GainFocusEvent, - ## LoseFocusEvent, - ## MouseClickEvent, - ## MouseDownEvent, - ## MouseUpEvent, - ## MouseDoubleClickEvent, - ## MouseContextDownEvent, - ## MouseContextUpEvent, - ## MouseContextDoubleClickEvent, - ## MouseMiddleDownEvent, - ## MouseMiddleUpEvent, - ## MouseMiddleDoubleClickEvent, - ## MouseEnterEvent, - ## MouseLeaveEvent, - ## MouseMoveEvent, - ## MouseDragEvent, - ## CommandEvent, - ## KeyPressEvent, - ## KeyDownEvent, - ## KeyUpEvent, - ## TextUpdateEvent, - ## TextEnterEvent, - ## SelectEvent, - ## MoveEvent, - ## SizeEvent, - ## CloseEvent, - ## ActivateEvent, - ## DeactivateEvent, - ## MinimizeEvent, - ## MaximizeEvent, - ## IdleEvent, - ## TimerEvent, - ## - ## #System Events - ## CloseFieldEvent, - ## - ## #Background initialization - ## InitializationEvent, - ## - ## # KEA 2004-04-26 - ## # should the event map be updated as a component - ## # module is loaded so that say a Button adds - ## # its component-specific events to the EventMap - ## # just like it registers itself with the registry? - ## # Button events? - ## ButtonMouseClickEvent, - ## - ## # Calendar events - ## CalendarMouseDoubleClickEvent, - ## CalendarChangedEvent, - ## CalendarDayEvent, - ## CalendarMonthEvent, - ## CalendarYearEvent, - ## CalendarWeekDayHeaderEvent, - ## - ## # Tree and MultiColumnList events - ## MouseContextClickEvent, - ## ItemFocusedEvent, - ## ItemActivatedEvent, - ## ItemExpandedEvent, - ## ItemExpandingEvent, - ## SelectionChangedEvent, - ## SelectionChangingEvent, - ## ListColumnClickEvent, - ## - ## IEHtmlTitleChangeEvent, - ## IEHtmlStatusTextChangeEvent, - ## IEHtmlDocumentCompleteEvent, - ## ] - ## - ## self._classToNameMap = {} - ## self._nameToClassMap = {} - ## self._createClassToNameMap() - ## self._createNameToClassMap() - ## - ## def _findEventClasses( self ) : - ## """ - ## Find all of the subclasses of Event in - ## this module and put them in an array. - ## """ - ## for item in __dict__.itervalues(): - ## if isinstance(item, types.ClassType): - ## if issubclass(item, Event): - ## self._table.append(item) - ## - ## def _createClassToNameMap( self ) : - ## for clazz in self._table : - ## self._classToNameMap[ clazz ] = clazz.name - ## - ## def _createNameToClassMap( self ) : - ## for clazz in self._table : - ## self._nameToClassMap[ clazz.name ] = clazz - ## - ## def classToName( self, aEventClass ) : - ## return self._classToNameMap[ aEventClass ] - ## - ## def nameToClass( self, aName ) : - ## return self._nameToClassMap[ aName ] - ## - ## def __repr__( self ) : - ## return str( self._classToNameMap ) + '\n\n' + str( self._nameToClassMap ) - - queue = None class EventQueue : --- 623,630 ---- class CloseFieldEvent(Event): name = 'closeField' + binding = EVT_CLOSE_FIELD + id = wxEVT_CLOSE_FIELD class EventQueue : |
From: Kevin A. <ka...@us...> - 2004-04-30 23:02:56
|
Update of /cvsroot/pythoncard/PythonCard/samples/testevents In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30595 Modified Files: testevents.py testevents.rsrc.py Log Message: removed position from command print, switched to on_exit_command Index: testevents.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/testevents/testevents.rsrc.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** testevents.rsrc.py 27 Apr 2004 02:43:33 -0000 1.2 --- testevents.rsrc.py 30 Apr 2004 23:02:47 -0000 1.3 *************** *** 21,25 **** { 'type':'MenuItem', 'name':'menuFileExit', ! 'label':'E&xit\tAlt+X' } ] } ] }, --- 21,26 ---- { 'type':'MenuItem', 'name':'menuFileExit', ! 'label':'E&xit\tAlt+X', ! 'command':'exit', } ] } ] }, Index: testevents.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/testevents/testevents.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** testevents.py 30 Apr 2004 22:42:05 -0000 1.19 --- testevents.py 30 Apr 2004 23:02:39 -0000 1.20 *************** *** 131,139 **** def on_mouseClick(self, event): ! print "mouseClick", event.target.name, event.position event.skip() def on_btn_mouseClick(self, event): ! print "btn mouseClick", event.target.name, event.position event.skip() --- 131,139 ---- def on_mouseClick(self, event): ! print "mouseClick", event.target.name event.skip() def on_btn_mouseClick(self, event): ! print "btn mouseClick", event.target.name event.skip() *************** *** 142,148 **** self.components.fld.text = "After setText" event.skip() - - def on_menuFileExit_select(self, event): - self.close() --- 142,145 ---- |
From: Kevin A. <ka...@us...> - 2004-04-30 22:42:18
|
Update of /cvsroot/pythoncard/PythonCard/samples/testevents In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26477/samples/testevents Modified Files: testevents.py Log Message: added additional event arg print for position, keyCode, altDown, etc. Index: testevents.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/testevents/testevents.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** testevents.py 30 Apr 2004 15:02:18 -0000 1.18 --- testevents.py 30 Apr 2004 22:42:05 -0000 1.19 *************** *** 88,116 **** def on_mouseMove(self, event): ! print "mouseMove", event.target.name event.skip() def on_mouseDrag(self, event): ! print "mouseDrag", event.target.name event.skip() def on_mouseEnter(self, event): ! print "mouseEnter", event.target.name event.skip() def on_mouseLeave(self, event): ! print "mouseLeave", event.target.name event.skip() def on_keyDown(self, event): ! print "keyDown", event.target.name event.skip() def on_keyUp(self, event): ! print "keyUp", event.target.name event.skip() def on_keyPress(self, event): ! print "keyPress", event.target.name event.skip() --- 88,119 ---- def on_mouseMove(self, event): ! print "mouseMove", event.target.name, event.position event.skip() def on_mouseDrag(self, event): ! print "mouseDrag", event.target.name, event.position event.skip() def on_mouseEnter(self, event): ! print "mouseEnter", event.target.name, event.position event.skip() def on_mouseLeave(self, event): ! print "mouseLeave", event.target.name, event.position event.skip() def on_keyDown(self, event): ! print "keyDown", event.target.name, event.keyCode, \ ! event.altDown, event.controlDown, event.shiftDown event.skip() def on_keyUp(self, event): ! print "keyUp", event.target.name, event.keyCode, \ ! event.altDown, event.controlDown, event.shiftDown event.skip() def on_keyPress(self, event): ! print "keyPress", event.target.name, event.keyCode, \ ! event.altDown, event.controlDown, event.shiftDown event.skip() *************** *** 128,136 **** def on_mouseClick(self, event): ! print "mouseClick", event.target.name event.skip() def on_btn_mouseClick(self, event): ! print "btn mouseClick", event.target.name event.skip() --- 131,139 ---- def on_mouseClick(self, event): ! print "mouseClick", event.target.name, event.position event.skip() def on_btn_mouseClick(self, event): ! print "btn mouseClick", event.target.name, event.position event.skip() |
From: Kevin A. <ka...@us...> - 2004-04-30 16:48:20
|
Update of /cvsroot/pythoncard/PythonCard/samples/testevents In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20601 Added Files: pycrustrc.py Log Message: added pycrustrc.py to help with debugging gc --- NEW FILE: pycrustrc.py --- import gc gc.set_debug(gc.DEBUG_LEAK | gc.DEBUG_OBJECTS) |
From: Kevin A. <ka...@us...> - 2004-04-30 16:26:27
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16207/tools/resourceEditor/templates Modified Files: template.py template.rsrc.py templateFullMenus.py templateFullMenus.rsrc.py Log Message: changed from on_menuFileExit_select to on_exit_command Background method Index: templateFullMenus.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/templates/templateFullMenus.rsrc.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** templateFullMenus.rsrc.py 1 Aug 2003 00:01:29 -0000 1.2 --- templateFullMenus.rsrc.py 30 Apr 2004 16:26:12 -0000 1.3 *************** *** 46,50 **** { 'type':'MenuItem', 'name':'menuFileExit', ! 'label':'E&xit\tAlt+X' } ] }, # most of the edit menu was copied from the searchexplorer sample {'type':'Menu', --- 46,51 ---- { 'type':'MenuItem', 'name':'menuFileExit', ! 'label':'E&xit\tAlt+X', ! 'command':'exit', } ] }, # most of the edit menu was copied from the searchexplorer sample {'type':'Menu', Index: template.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/templates/template.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** template.py 24 Apr 2004 21:09:23 -0000 1.4 --- template.py 30 Apr 2004 16:26:12 -0000 1.5 *************** *** 15,25 **** pass - # KEA 2003-07-31 - # should we default to using commands instead - # of select events as the recommended - # way of doing menus? - def on_menuFileExit_select(self, event): - self.close() - if __name__ == '__main__': --- 15,18 ---- Index: templateFullMenus.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/templates/templateFullMenus.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** templateFullMenus.py 25 Apr 2004 23:12:46 -0000 1.8 --- templateFullMenus.py 30 Apr 2004 16:26:12 -0000 1.9 *************** *** 210,216 **** self.printer.PageSetup() - def on_menuFileExit_select(self, event): - self.close() - # the following was copied and pasted from the searchexplorer sample --- 210,213 ---- Index: template.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/templates/template.rsrc.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** template.rsrc.py 28 May 2002 00:34:22 -0000 1.4 --- template.rsrc.py 30 Apr 2004 16:26:12 -0000 1.5 *************** *** 23,27 **** { 'type':'MenuItem', 'name':'menuFileExit', ! 'label':'E&xit' } ] } ] }, --- 23,28 ---- { 'type':'MenuItem', 'name':'menuFileExit', ! 'label':'E&xit', ! 'command':'exit', } ] } ] }, |
From: Kevin A. <ka...@us...> - 2004-04-30 16:26:21
|
Update of /cvsroot/pythoncard/PythonCard/tools/textEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16207/tools/textEditor Modified Files: textEditor.pyw textEditor.rsrc.py Log Message: changed from on_menuFileExit_select to on_exit_command Background method Index: textEditor.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/textEditor/textEditor.rsrc.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** textEditor.rsrc.py 28 May 2002 00:34:22 -0000 1.16 --- textEditor.rsrc.py 30 Apr 2004 16:26:12 -0000 1.17 *************** *** 46,50 **** { 'type':'MenuItem', 'name':'menuFileExit', ! 'label':'E&xit\tAlt+X' } ] }, # most of the edit menu was copied from the searchexplorer sample {'type':'Menu', --- 46,51 ---- { 'type':'MenuItem', 'name':'menuFileExit', ! 'label':'E&xit\tAlt+X', ! 'command':'exit', } ] }, # most of the edit menu was copied from the searchexplorer sample {'type':'Menu', Index: textEditor.pyw =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/textEditor/textEditor.pyw,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** textEditor.pyw 29 Apr 2004 23:59:23 -0000 1.71 --- textEditor.pyw 30 Apr 2004 16:26:12 -0000 1.72 *************** *** 352,358 **** self.printer.PageSetup() - def on_menuFileExit_select(self, event): - self.close() - # the following was copied and pasted from the searchexplorer sample --- 352,355 ---- |
From: Kevin A. <ka...@us...> - 2004-04-30 16:26:21
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16207/tools/resourceEditor Modified Files: resourceEditor.py resourceEditor.rsrc.py Log Message: changed from on_menuFileExit_select to on_exit_command Background method Index: resourceEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/resourceEditor.py,v retrieving revision 1.187 retrieving revision 1.188 diff -C2 -d -r1.187 -r1.188 *** resourceEditor.py 25 Apr 2004 23:12:46 -0000 1.187 --- resourceEditor.py 30 Apr 2004 16:26:12 -0000 1.188 *************** *** 907,913 **** - def on_menuFileExit_select(self, event): - self.close() - def on_menuHelpAbout_select(self, event): dialog.scrolledMessageDialog(self, self.readme, 'About resourceEditor...') --- 907,910 ---- Index: resourceEditor.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/resourceEditor.rsrc.py,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** resourceEditor.rsrc.py 16 Apr 2004 23:41:44 -0000 1.48 --- resourceEditor.rsrc.py 30 Apr 2004 16:26:12 -0000 1.49 *************** *** 65,68 **** --- 65,69 ---- 'name':'menuFileExit', 'label':'E&xit\tAlt+X', + 'command':'exit', }, ] |
From: Kevin A. <ka...@us...> - 2004-04-30 16:26:20
|
Update of /cvsroot/pythoncard/PythonCard/tools/findfiles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16207/tools/findfiles Modified Files: findfiles.py findfiles.rsrc.py Log Message: changed from on_menuFileExit_select to on_exit_command Background method Index: findfiles.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/findfiles/findfiles.py,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** findfiles.py 25 Apr 2004 06:26:49 -0000 1.75 --- findfiles.py 30 Apr 2004 16:26:12 -0000 1.76 *************** *** 448,454 **** event.skip() - def on_menuFileExit_select(self, event): - self.close() - def on_showFindFilesDocumentation_command(self, event): global findfiles_url --- 448,451 ---- Index: findfiles.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/findfiles/findfiles.rsrc.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** findfiles.rsrc.py 29 Nov 2002 18:40:14 -0000 1.21 --- findfiles.rsrc.py 30 Apr 2004 16:26:12 -0000 1.22 *************** *** 32,35 **** --- 32,36 ---- 'name':'menuFileExit', 'label':'E&xit\tAlt+X', + 'command':'exit', }, ] |
From: Kevin A. <ka...@us...> - 2004-04-30 16:26:20
|
Update of /cvsroot/pythoncard/PythonCard/tools/codeEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16207/tools/codeEditor Modified Files: codeEditorR.rsrc.py Log Message: changed from on_menuFileExit_select to on_exit_command Background method Index: codeEditorR.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/codeEditor/codeEditorR.rsrc.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** codeEditorR.rsrc.py 24 Apr 2004 17:20:01 -0000 1.2 --- codeEditorR.rsrc.py 30 Apr 2004 16:26:11 -0000 1.3 *************** *** 84,87 **** --- 84,88 ---- 'name':'menuFileExit', 'label':'E&xit\tAlt+X', + 'command':'exit', }, ] |
From: Kevin A. <ka...@us...> - 2004-04-30 15:02:27
|
Update of /cvsroot/pythoncard/PythonCard/samples/testevents In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31077/samples/testevents Modified Files: testevents.py Log Message: fixed findFocus() call for Mac Index: testevents.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/testevents/testevents.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** testevents.py 29 Apr 2004 20:14:36 -0000 1.17 --- testevents.py 30 Apr 2004 15:02:18 -0000 1.18 *************** *** 23,27 **** self.btnTimer.start(3 * 1000) # 3 seconds self.components.btn.setFocus() ! print " has focus:", self.findFocus().name def on_activate(self, event): --- 23,31 ---- self.btnTimer.start(3 * 1000) # 3 seconds self.components.btn.setFocus() ! # on the Mac, findFocus() is returning None ! # when the sample is started with a runtime tool ! focus = self.findFocus() ! if focus: ! print " has focus:", focus.name def on_activate(self, event): |
From: Kevin A. <ka...@us...> - 2004-04-30 00:00:02
|
Update of /cvsroot/pythoncard/PythonCard/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28465/docs Modified Files: changelog.txt Log Message: added new background event binding and dispatch added hacks to MessageWatcher and EventQueue to support posting messages until we have an EventLog class added restore event (inverse of minimize) added singleItemExpandingSizerLayout method to background moved initialize event dispatch and bindWindowEvents to end of Background.__init__ to correct initialization bug with menus... Index: changelog.txt =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/docs/changelog.txt,v retrieving revision 1.277 retrieving revision 1.278 diff -C2 -d -r1.277 -r1.278 *** changelog.txt 27 Apr 2004 22:03:05 -0000 1.277 --- changelog.txt 29 Apr 2004 23:59:23 -0000 1.278 *************** *** 3,6 **** --- 3,7 ---- Release 0.8 2004-05-?? + added restore (inverse of minimize) background window event added twistedEchoClient sample added twistedModel.py module to hold TwistedApplication |
From: Kevin A. <ka...@us...> - 2004-04-30 00:00:02
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28465 Modified Files: debug.py event.py model.py Log Message: added new background event binding and dispatch added hacks to MessageWatcher and EventQueue to support posting messages until we have an EventLog class added restore event (inverse of minimize) added singleItemExpandingSizerLayout method to background moved initialize event dispatch and bindWindowEvents to end of Background.__init__ to correct initialization bug with menus... Index: debug.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/debug.py,v retrieving revision 1.124 retrieving revision 1.125 diff -C2 -d -r1.124 -r1.125 *** debug.py 25 Apr 2004 15:23:34 -0000 1.124 --- debug.py 29 Apr 2004 23:59:23 -0000 1.125 *************** *** 126,145 **** def eventOccurred(self, eventAdapter): ! evt = eventAdapter.getDispatchedEvent() ! eventName = evt.getName() ! sourceName = evt.getSource().name ! ! # KEA 2002-06-10 ! # displaying idle is a losing proposition ! # the act of displaying the idle event ends up ! # causing another idle event as the queue empties ! # with the wxSTC or at least that is what I think was ! # happening ! if eventName == event.IdleEvent.name: ! # print eventAdapter.getEventWasUsed(), eventName, sourceName ! return ! ! used = eventAdapter.getEventWasUsed() if used: eventText = eventName + ' : ' + sourceName --- 126,152 ---- def eventOccurred(self, eventAdapter): ! if isinstance(eventAdapter, tuple): ! # new way hack to stay compatible with one arg _notifyEventListeners ! eventName, sourceName, used = eventAdapter ! if eventName == event.IdleEvent.name: ! return ! else: ! # old way ! evt = eventAdapter.getDispatchedEvent() ! eventName = evt.getName() ! sourceName = evt.getSource().name ! evt = None + # KEA 2002-06-10 + # displaying idle is a losing proposition + # the act of displaying the idle event ends up + # causing another idle event as the queue empties + # with the wxSTC or at least that is what I think was + # happening + if eventName == event.IdleEvent.name: + # print eventAdapter.getEventWasUsed(), eventName, sourceName + return + used = eventAdapter.getEventWasUsed() + if used: eventText = eventName + ' : ' + sourceName Index: model.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/model.py,v retrieving revision 1.160 retrieving revision 1.161 diff -C2 -d -r1.160 -r1.161 *** model.py 27 Apr 2004 06:07:48 -0000 1.160 --- model.py 29 Apr 2004 23:59:23 -0000 1.161 *************** *** 378,381 **** --- 378,383 ---- self._handlers = {} self._parseHandlers() + if False: + print "Scriptable init", self._handlers.keys() def _parseHandlers(self): *************** *** 506,510 **** ! class Background( event.Changeable, Scriptable, wx.Frame, event.EventSource): """ A window that contains Widgets. --- 508,513 ---- ! ##class Background( event.Changeable, Scriptable, wx.Frame, event.EventSource): ! class Background(Scriptable, wx.Frame, event.EventSource): """ A window that contains Widgets. *************** *** 515,519 **** Initialize this instance. """ ! event.Changeable.__init__( self ) Scriptable.__init__(self, aStack) event.EventSource.__init__(self) --- 518,522 ---- Initialize this instance. """ ! ## event.Changeable.__init__( self ) Scriptable.__init__(self, aStack) event.EventSource.__init__(self) *************** *** 527,531 **** self.menuBar = None self.statusBar = None ! self.dispatch = event.EventDispatch(self, self) self._exiting = False --- 530,534 ---- self.menuBar = None self.statusBar = None ! ## self.dispatch = event.EventDispatch(self, self) self._exiting = False *************** *** 549,565 **** style | wx.NO_FULL_REPAINT_ON_RESIZE, aBgRsrc.name) - - # RDS 2004-04-14 - # Post the Background initialization event. - - self.EVT_OPEN_BACKGROUND_TYPE = wx.NewEventType() - self.id = wx.NewId() - self.Connect( self.GetId(), -1, - self.EVT_OPEN_BACKGROUND_TYPE, - self._dispatchOpenBackground ) - evt = wx.PyCommandEvent( self.EVT_OPEN_BACKGROUND_TYPE, self.GetId() ) - wx.PostEvent( self, evt ) - EVT_LATENT_BACKGROUNDBIND(self, self.OnLatentBackgroundBind) - wx.PostEvent(self, wxLatentBackgroundBindEvent()) self._initLayout(aBgRsrc.components) --- 552,555 ---- *************** *** 583,588 **** wx.EVT_MENU_HIGHLIGHT_ALL(self, self.menuHighlight) - self._bindWindowEvents() - if aParent is None: self.stack.app.SetTopWindow(self) --- 573,576 ---- *************** *** 593,606 **** self.Show(True) ! def _dispatchOpenBackground( self, evt ) : ! # KEA 2002-06-10 ! # don't need this dispatch since dispatch is already ! # bound in the background ! ##self.event.eventOccurred( event.InitializationEvent( self.scriptable ) ) ! self.dispatch.eventOccurred( event.InitializationEvent( self ) ) ! def OnLatentBackgroundBind(self, evt): ! self.wxRegistry = {event.IdleEvent:(wx.EVT_IDLE, wx.wxEVT_IDLE), event.MoveEvent:(wx.EVT_MOVE, wx.wxEVT_MOVE), event.SizeEvent:(wx.EVT_SIZE, wx.wxEVT_SIZE), --- 581,655 ---- self.Show(True) + # RDS 2004-04-14 + # Post the Background initialization event. ! self.EVT_OPEN_BACKGROUND_TYPE = wx.NewEventType() ! self.id = wx.NewId() ! self.Connect(self.GetId(), -1, ! self.EVT_OPEN_BACKGROUND_TYPE, ! self.on_initialize) ! #self._dispatchOpenBackground ) ! evt = wx.PyCommandEvent(self.EVT_OPEN_BACKGROUND_TYPE, self.GetId()) ! evt.target = self ! wx.PostEvent(self, evt) ! EVT_LATENT_BACKGROUNDBIND(self, self.OnLatentBackgroundBind) ! wx.PostEvent(self, wxLatentBackgroundBindEvent()) ! # for some reason the Message Watcher isn't a listener yet ! # so calling eventOccurred2 doesn't do anything ! #print event.EventQueue()._impl._listeners ! #event.EventQueue()._impl.eventOccurred2('initialize', self.name) ! ! self._bindWindowEvents() ! ! ! def on_initialize(self, evt): ! # override in subclass ! pass ! ! def on_close(self, evt): ! # override in subclass ! evt.Skip() ! ! def singleItemExpandingSizerLayout(self): ! """Convenience method for backgrounds with only a ! single component on the background where the component ! should expand with the background as in an editor. ! Call from within the on_initialize event handler.""" ! ! self.sizer = wx.BoxSizer(wx.VERTICAL) ! name = self.components.order[0] ! self.sizer.Add(self.components[name], True, wx.EXPAND) ! self.sizer.Fit(self) ! self.sizer.SetSizeHints(self) ! self.panel.SetSizer(self.sizer) ! self.panel.Layout() ! ! ## def _dispatchOpenBackground( self, evt ) : ! ## # KEA 2002-06-10 ! ## # don't need this dispatch since dispatch is already ! ## # bound in the background ! ## ##self.event.eventOccurred( event.InitializationEvent( self.scriptable ) ) ! ## self.dispatch.eventOccurred( event.InitializationEvent( self ) ) ! ! ! # KEA 2004-04-28 ! # experimental alternative implementation of ! # OnLatentBackgroundBind and _dispatch ! ! def OnLatentBackgroundBind(self, evt): ! if self.stack.app.mw: ! bindUnusedEvents = True ! else: ! bindUnusedEvents = False ! ! self.eventIdToHandler = {} ! ! # this is actually slightly evil because dictionary keys ! # are supposed to be immutable, but you can change classes ! # and the same class imported into a different namespace ! # would be different, so for now I just made this a local variable ! # which is probably okay compared to keeping a reference around in self ! wxRegistry = {event.IdleEvent:(wx.EVT_IDLE, wx.wxEVT_IDLE), event.MoveEvent:(wx.EVT_MOVE, wx.wxEVT_MOVE), event.SizeEvent:(wx.EVT_SIZE, wx.wxEVT_SIZE), *************** *** 609,624 **** event.ActivateEvent:(wx.EVT_ACTIVATE, wx.wxEVT_ACTIVATE), event.CloseEvent:(wx.EVT_CLOSE, wx.wxEVT_CLOSE_WINDOW)} - # can't have ActivatEvent or CloseEvent - # since during a close the event listeners are destroyed - #event.ActivateEvent:(wx.EVT_ACTIVATE, wx.wxEVT_ACTIVATE), self.wxEventIdMap = {} ! for key in self.wxRegistry: ! value = self.wxRegistry[key] self.wxEventIdMap[value[1]] = key ! for eventClass in self.wxRegistry: ! wxFunction = self.wxRegistry[eventClass][0] ! wxFunction(self, self._dispatch) def _dispatch(self, aWxEvent): --- 658,727 ---- event.ActivateEvent:(wx.EVT_ACTIVATE, wx.wxEVT_ACTIVATE), event.CloseEvent:(wx.EVT_CLOSE, wx.wxEVT_CLOSE_WINDOW)} self.wxEventIdMap = {} ! for key in wxRegistry: ! value = wxRegistry[key] self.wxEventIdMap[value[1]] = key ! # helper variable to simplify test for whether to bind virtual events ! boundEvents = [] ! ! # once we aren't using a registry this will be a bit easier to ! # decipher compared to having to index into wxRegistry ! for eventClass in wxRegistry: ! handler = self.findHandler('on_' + eventClass.name) ! if handler or bindUnusedEvents: ! # only bind events that have an event handler ! # in this scenario unused events are never bound ! # which is more efficient, but the Message Watcher needs ! # to be changed ! # alternatively we can bind everything and then in _dispatch ! # if there isn't a match in eventIdToHandler then we know ! # the event isn't used and we can set used to False ! # the complication would be that we probably have to have to ! # always call Skip() which may or may not be a hassle with components ! self.Bind(wxRegistry[eventClass][0], self._dispatch) ! boundEvents.append(eventClass) ! if handler: ! if 0: ! print "binding", eventClass.name, handler._name, wxRegistry[eventClass][1] ! self.eventIdToHandler[wxRegistry[eventClass][1]] = handler ! # deactivate is a special case ! # as far as wxPython is concerned it is an activate event ! # so if we've already bound that to _dispatch we don't want ! # to bind it twice ! # if we have an on_deactivate event handler though we need to record ! # that separately for dispatch in eventIdToHandler ! # we'll have the same issue with other "virtual" events like mouseDrag ! handler = self.findHandler('on_' + event.DeactivateEvent.name) ! if handler or bindUnusedEvents: ! if not event.ActivateEvent in boundEvents: ! self.Bind(wxRegistry[event.ActivateEvent][0], self._dispatch) ! if handler: ! # there is no such thing as a deactivate event id, so just use the name ! self.eventIdToHandler[event.DeactivateEvent.name] = handler ! handler = self.findHandler('on_' + event.RestoreEvent.name) ! # now do the same kind of thing for restore ! if handler or bindUnusedEvents: ! if not event.MinimizeEvent in boundEvents: ! self.Bind(wxRegistry[event.MinimizeEvent][0], self._dispatch) ! if handler: ! self.eventIdToHandler[event.RestoreEvent.name] = handler ! ! if 0: ! print "\nboundEvents:" ! for evt in boundEvents: ! print " ", evt.name ! print "\n\n" ! print "\nself.eventIdToHandler:" ! for id in self.eventIdToHandler: ! print " ", id, self.eventIdToHandler[id]._function ! print "\n\n" ! ! # is this cleanup necessary ! # it would be a pain to have to ! # do this everywhere ! handler = None ! boundEvents = None def _dispatch(self, aWxEvent): *************** *** 630,633 **** --- 733,737 ---- except: pass + eventName = None if eventType == wx.wxEVT_MOVE: aWxEvent.position = tuple(aWxEvent.GetPosition()) *************** *** 635,687 **** aWxEvent.size = tuple(aWxEvent.GetSize()) elif eventType == wx.wxEVT_ICONIZE: ! aWxEvent.minimized = aWxEvent.Iconized() elif eventType == wx.wxEVT_MAXIMIZE: aWxEvent.maximized = aWxEvent.target.IsMaximized() ! ! evt = None ! #if aWxEvent in [wx.wxEVT_IDLE]: ! if eventType in self.wxEventIdMap: ! evt = self.wxEventIdMap[eventType](self) ! if evt.__class__ is event.ActivateEvent and not aWxEvent.GetActive(): ! evt = event.DeactivateEvent(self) ! evt._nativeEvent = aWxEvent ! # KEA 2004-04-24 ! # need to verify that this logic always works and doesn't do ! # the wrong thing for child windows and main windows with and without ! # an on_close handler ! if evt is not None: ! if self._exiting: ! # Don't display messages when quitting the app ! # the Message Watcher may no longer exist ! # and will cause Python to crash. ! try: ! event.EventQueue().removeListener(self.stack.app.mw) ! except: ! # already removed Message Watcher or it is not in use ! pass ! return ! self._notifyEventListeners(evt) ! if not evt.getUsed(): ! aWxEvent.Skip() ! ! # KEA 2004-04-26 ! # attempt to remove circular references ! # to cleanup background event memory leaks ! evt._nativeEvent.target = evt._nativeEvent.eventObject = None ! evt._nativeEvent = None ! evt._source = evt.target = None if 0: ! print evt ! evt = None ! #print " ", str(self.GetParent()).split(';')[0] ! #print " ", evt.getUsed(), str(aWxEvent.GetSkipped()).split(';')[0] ! #print " ", str(aWxEvent).split(';')[0], str(aWxEvent.GetEventObject()).split(';')[0] ! # KEA 2002-07-01 ! # If we have a close event and the user code called ! # Skip() then we really are closing if this is the main app window. if eventType == wx.wxEVT_CLOSE_WINDOW and aWxEvent.GetSkipped() and self.GetParent() is None: self._exiting = True --- 739,790 ---- aWxEvent.size = tuple(aWxEvent.GetSize()) elif eventType == wx.wxEVT_ICONIZE: ! #aWxEvent.minimized = aWxEvent.Iconized() ! minimized = aWxEvent.Iconized() ! if not minimized: ! eventType = event.RestoreEvent.name ! eventName = event.RestoreEvent.name elif eventType == wx.wxEVT_MAXIMIZE: aWxEvent.maximized = aWxEvent.target.IsMaximized() ! elif eventType == wx.wxEVT_ACTIVATE and not aWxEvent.GetActive(): ! eventType = event.DeactivateEvent.name ! eventName = event.DeactivateEvent.name ! if not eventName: ! eventName = self.wxEventIdMap[eventType].name ! if self._exiting: ! # Don't display messages when quitting the app ! # the Message Watcher may no longer exist ! # and will cause Python to crash. ! try: ! event.EventQueue().removeListener(self.stack.app.mw) ! except: ! # already removed Message Watcher or it is not in use ! pass ! ! # it shouldn't be possible to be in _dispatch for an event ! # that wasn't bound above, but just in case... ! handler = self.eventIdToHandler.get(eventType, None) ! if handler: ! event.EventQueue()._impl.eventOccurred2(eventName, self.name, True) if 0: ! print "dispatching", handler._name ! # make a lowercase alias ! aWxEvent.skip = aWxEvent.Skip ! # this is what is in event.py ! # aHandler.getFunction()( aOwner, self.getSource(), self ) ! handler.getFunction()(self, aWxEvent) ! # do we have to clean up this alias? ! aWxEvent.skip = None ! # how about this local reference to handler? ! handler = None ! # this check is done here because there is always an on_close handler defined ! # in the Background class if eventType == wx.wxEVT_CLOSE_WINDOW and aWxEvent.GetSkipped() and self.GetParent() is None: self._exiting = True + else: + event.EventQueue()._impl.eventOccurred2(eventName, self.name, False) + # hopefully this is all we need to do for "unused events" + aWxEvent.Skip() Index: event.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/event.py,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** event.py 27 Apr 2004 17:22:28 -0000 1.55 --- event.py 29 Apr 2004 23:59:23 -0000 1.56 *************** *** 374,377 **** --- 374,380 ---- name = 'minimize' + class RestoreEvent(Event): + name = 'restore' + class MaximizeEvent(Event): name = 'maximize' *************** *** 680,683 **** --- 683,689 ---- self._notifyEventListeners( aEvent ) + def eventOccurred2(self, eventName, sourceName, used): + self._notifyEventListeners((eventName, sourceName, used)) + def __init__( self ) : if EventQueue._impl is None : |
From: Kevin A. <ka...@us...> - 2004-04-29 23:59:47
|
Update of /cvsroot/pythoncard/PythonCard/tools/textEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28465/tools/textEditor Modified Files: textEditor.pyw Log Message: added new background event binding and dispatch added hacks to MessageWatcher and EventQueue to support posting messages until we have an EventLog class added restore event (inverse of minimize) added singleItemExpandingSizerLayout method to background moved initialize event dispatch and bindWindowEvents to end of Background.__init__ to correct initialization bug with menus... Index: textEditor.pyw =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/textEditor/textEditor.pyw,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** textEditor.pyw 25 Apr 2004 23:12:46 -0000 1.70 --- textEditor.pyw 29 Apr 2004 23:59:23 -0000 1.71 *************** *** 72,84 **** def on_initialize(self, event): ! sizer1 = wx.BoxSizer(wx.VERTICAL) ! sizer1.Add(self.components.fldDocument, 1, wx.EXPAND) ! ! sizer1.Fit(self) ! sizer1.SetSizeHints(self) ! self.panel.SetSizer(sizer1) ! self.panel.SetAutoLayout(1) ! self.panel.Layout() ! # KEA 2002-06-27 # copied from codeEditor.py --- 72,77 ---- def on_initialize(self, event): ! self.singleItemExpandingSizerLayout() ! # KEA 2002-06-27 # copied from codeEditor.py |
From: Kevin A. <ka...@us...> - 2004-04-29 20:14:45
|
Update of /cvsroot/pythoncard/PythonCard/samples/testevents In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12575/testevents Modified Files: testevents.py Log Message: added additional events for restore, command Index: testevents.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/testevents/testevents.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** testevents.py 27 Apr 2004 17:22:29 -0000 1.16 --- testevents.py 29 Apr 2004 20:14:36 -0000 1.17 *************** *** 58,67 **** event.skip() def on_move(self, event): ! print "move", event.target.name event.skip() def on_size(self, event): ! print "size", event.target.name event.skip() --- 58,71 ---- event.skip() + def on_restore(self, event): + print "restore", event.target.name + event.skip() + def on_move(self, event): ! print "move", event.target.name, event.position event.skip() def on_size(self, event): ! print "size", event.target.name, event.size event.skip() *************** *** 123,126 **** --- 127,134 ---- event.skip() + def on_btn_mouseClick(self, event): + print "btn mouseClick", event.target.name + event.skip() + def on_setText_command(self, event): print "setText command", event.target.name |
From: Kevin A. <ka...@us...> - 2004-04-29 20:13:57
|
Update of /cvsroot/pythoncard/PythonCard/samples/life In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12401/life Modified Files: life.py Log Message: fixed x, y tuples Index: life.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/life/life.py,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** life.py 25 Apr 2004 03:03:45 -0000 1.35 --- life.py 29 Apr 2004 20:13:47 -0000 1.36 *************** *** 230,236 **** if cellWidth == 1: ! canvas.drawPoint(x1, y1) else: ! canvas.drawRectangle(x1, y1, cellWidth, cellWidth) if not self.toggleToLife: --- 230,236 ---- if cellWidth == 1: ! canvas.drawPoint((x1, y1)) else: ! canvas.drawRectangle((x1, y1), (cellWidth, cellWidth)) if not self.toggleToLife: |
From: Kevin A. <ka...@us...> - 2004-04-28 19:41:23
|
Update of /cvsroot/pythoncard/PythonCard/samples/twistedEchoClient In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26385/samples/twistedEchoClient Modified Files: readme.txt Log Message: updated to reflect change in TwistedApplication Index: readme.txt =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/twistedEchoClient/readme.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** readme.txt 27 Apr 2004 22:03:06 -0000 1.1 --- readme.txt 28 Apr 2004 19:41:14 -0000 1.2 *************** *** 11,16 **** def OnTimer(self, event): ! reactor.runUntilCurrent() ! reactor.doIteration(0) def OnExit(self): --- 11,15 ---- def OnTimer(self, event): ! reactor.iterate() def OnExit(self): |
From: Kevin A. <ka...@us...> - 2004-04-28 19:09:50
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20061 Modified Files: twistedModel.py Log Message: changed to just calling iterate in the timer event Index: twistedModel.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/twistedModel.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** twistedModel.py 27 Apr 2004 22:03:05 -0000 1.1 --- twistedModel.py 28 Apr 2004 19:09:34 -0000 1.2 *************** *** 25,30 **** def OnTimer(self, event): ! reactor.runUntilCurrent() ! reactor.doIteration(0) def OnExit(self): --- 25,29 ---- def OnTimer(self, event): ! reactor.iterate() def OnExit(self): |
From: Kevin A. <ka...@us...> - 2004-04-28 02:58:09
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7715/tools/resourceEditor/modules Modified Files: resourceOutput.py Log Message: fixed default alignment output for fields Index: resourceOutput.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/resourceOutput.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** resourceOutput.py 20 Apr 2004 14:39:28 -0000 1.23 --- resourceOutput.py 28 Apr 2004 02:58:00 -0000 1.24 *************** *** 71,75 **** continue ! if key == 'alignment' and aWidget.__class__.__name__ == 'StaticText' and value == 'left': continue if key == 'border' and aWidget.__class__.__name__ in txtWidgets and value == '3d': --- 71,77 ---- continue ! if key == 'alignment' and \ ! aWidget.__class__.__name__ in ['StaticText', 'PasswordField', 'TextField', 'TextArea'] \ ! and value == 'left': continue if key == 'border' and aWidget.__class__.__name__ in txtWidgets and value == '3d': *************** *** 96,100 **** dStr += """ %s:%s, \n""" % (repr(key), repr(value)) else: ! if (key in ['editable', 'enabled', 'visible'] and value == 1) or (key in ['checked', 'default'] and value == 0): # don't include default values pass --- 98,103 ---- dStr += """ %s:%s, \n""" % (repr(key), repr(value)) else: ! if (key in ['editable', 'enabled', 'visible'] and value == True) or \ ! (key in ['checked', 'default'] and value == False): # don't include default values pass |
From: Kevin A. <ka...@us...> - 2004-04-28 01:25:01
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25061 Modified Files: widget.py Log Message: fixed _getToolTip bug Index: widget.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/widget.py,v retrieving revision 1.118 retrieving revision 1.119 diff -C2 -d -r1.118 -r1.119 *** widget.py 27 Apr 2004 19:28:27 -0000 1.118 --- widget.py 28 Apr 2004 01:24:50 -0000 1.119 *************** *** 103,107 **** def _getToolTip(self): ! return self.GetToolTip().GetTip() def _getFont(self): --- 103,110 ---- def _getToolTip(self): ! try: ! return self.GetToolTip().GetTip() ! except: ! return "" def _getFont(self): |
From: Kevin A. <ka...@us...> - 2004-04-27 23:08:31
|
Update of /cvsroot/pythoncard/PythonCard/samples/twistedEchoClient In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32747/twistedEchoClient Modified Files: twistedEchoClient.py Log Message: added loginDialog Index: twistedEchoClient.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/twistedEchoClient/twistedEchoClient.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** twistedEchoClient.py 27 Apr 2004 22:03:06 -0000 1.1 --- twistedEchoClient.py 27 Apr 2004 23:08:20 -0000 1.2 *************** *** 8,11 **** --- 8,13 ---- from twisted.internet import reactor + from PythonCard.templates.dialogs.loginDialog import loginDialog + class DefinedError(pb.Error): pass *************** *** 40,48 **** # other twisted apps def on_buttonLogin_mouseClick(self, event): ! reactor.connectTCP("localhost", pb.portno, self.pbfactory) ! self.pbfactory.login( ! UsernamePassword("guest", "guest") ! ).addCallbacks(self.loginsuccess, ! self.loginfailure) def loginsuccess(self, perspective): --- 42,57 ---- # other twisted apps def on_buttonLogin_mouseClick(self, event): ! result = loginDialog(self, port=pb.portno) ! if result['accepted']: ! # verify input here? ! host = result['host'] ! port = result['port'] ! username = result['username'] ! password = result['password'] ! reactor.connectTCP(host, port, self.pbfactory) ! self.pbfactory.login( ! UsernamePassword(username, password) ! ).addCallbacks(self.loginsuccess, ! self.loginfailure) def loginsuccess(self, perspective): |
From: Kevin A. <ka...@us...> - 2004-04-27 23:08:05
|
Update of /cvsroot/pythoncard/PythonCard/templates/dialogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32610 Added Files: loginDialog.py loginDialog.rsrc.py Log Message: added loginDialog for twistedEchoClient --- NEW FILE: loginDialog.py --- """ __version__ = "$Revision: 1.1 $" __date__ = "$Date: 2004/04/27 23:07:56 $" """ from PythonCard import model class LoginDialog(model.CustomDialog): def __init__(self, parent, host="127.0.0.1", port=80, username="guest", password="guest"): model.CustomDialog.__init__(self, parent) self.components.fldHost.text = host self.components.fldPort.text = str(port) self.components.fldUsername.text = username self.components.fldPassword.text = password #def myDialog(parent, txt): def loginDialog(parent, host="127.0.0.1", port=80, username="guest", password="guest"): dlg = LoginDialog(parent, host, port, username, password) dlg.showModal() result = {'accepted':dlg.accepted()} result['host'] = dlg.components.fldHost.text result['port'] = int(dlg.components.fldPort.text) result['username'] = dlg.components.fldUsername.text result['password'] = dlg.components.fldPassword.text dlg.destroy() return result --- NEW FILE: loginDialog.rsrc.py --- {'type':'CustomDialog', 'name':'Template', 'title':'Dialog Template', 'position':(5, 5), 'size':(300, 197), 'components': [ {'type':'TextField', 'name':'fldHost', 'position':(95, 10), 'alignment':'left', 'text':'127.0.0.1', }, {'type':'TextField', 'name':'fldPort', 'position':(95, 33), 'size':(48, -1), 'alignment':'left', 'text':'80', }, {'type':'TextField', 'name':'fldUsername', 'position':(95, 57), 'alignment':'left', 'text':'guest', }, {'type':'TextField', 'name':'fldPassword', 'position':(95, 81), 'alignment':'left', 'text':'guest', }, {'type':'StaticText', 'name':'stcHost', 'position':(10, 10), 'text':'Host:', }, {'type':'StaticText', 'name':'stcPort', 'position':(12, 34), 'text':'Port:', }, {'type':'StaticText', 'name':'stcPassword', 'position':(13, 86), 'text':'Password:', }, {'type':'StaticText', 'name':'stcUsername', 'position':(11, 61), 'text':'Username:', }, {'type':'Button', 'id':5100, 'name':'btnOK', 'position':(9, 119), 'label':'OK', }, {'type':'Button', 'id':5101, 'name':'btnCancel', 'position':(101, 119), 'label':'Cancel', }, ] # end components } # end CustomDialog |
From: Kevin A. <ka...@us...> - 2004-04-27 22:03:28
|
Update of /cvsroot/pythoncard/PythonCard/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17350/docs Modified Files: changelog.txt Log Message: added TwistedApplication subclass for writing Twisted GUI apps added twistedEchoClient sample Index: changelog.txt =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/docs/changelog.txt,v retrieving revision 1.276 retrieving revision 1.277 diff -C2 -d -r1.276 -r1.277 *** changelog.txt 25 Apr 2004 22:37:21 -0000 1.276 --- changelog.txt 27 Apr 2004 22:03:05 -0000 1.277 *************** *** 3,6 **** --- 3,9 ---- Release 0.8 2004-05-?? + added twistedEchoClient sample + added twistedModel.py module to hold TwistedApplication + added redraw method to Widget to simplify immediate redraws added event.target workaround for timer events moved getStyleConfigPath to configuration module |
From: Kevin A. <ka...@us...> - 2004-04-27 22:03:16
|
Update of /cvsroot/pythoncard/PythonCard/samples/twistedEchoClient In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17350/samples/twistedEchoClient Added Files: .cvsignore readme.txt twistedEchoClient.py twistedEchoClient.rsrc.py Log Message: added TwistedApplication subclass for writing Twisted GUI apps added twistedEchoClient sample --- NEW FILE: twistedEchoClient.rsrc.py --- {'stack':{'type':'Stack', 'name':'Dialogs', 'backgrounds': [ {'type':'Background', 'name':'bg1', 'title':'Twisted PythonCard PB Echo Client', 'size':(375, 270), 'statusBar':1, 'menubar': {'type':'MenuBar', 'menus': [ {'type':'Menu', 'name':'File', 'label':'&File', 'items': [ {'type':'MenuItem', 'name':'menuFileExit', 'label':'E&xit\tAlt+X', 'command':'exit', }, ] }, ] }, 'components': [ {'type':'StaticText', 'name':'StatusStaticText', 'position':(284, 215), 'backgroundColor':(0, 255, 127), 'font':{'family': 'sansSerif', 'size': 10}, 'text':'CONNECTED', 'visible':0, }, {'type':'Button', 'name':'buttonLogin', 'position':(22, 140), 'size':(117, 26), 'label':'Login', }, {'type':'TextField', 'name':'SendTextField', 'position':(20, 180), 'size':(330, -1), 'alignment':'left', }, {'type':'TextArea', 'name':'ReceivedTextArea', 'position':(20, 0), 'size':(330, 125), 'alignment':'left', }, {'type':'Button', 'name':'buttonSend', 'position':(151, 140), 'size':(125, 25), 'label':'Send', }, ] # end components } # end background ] # end backgrounds } } --- NEW FILE: .cvsignore --- .cvsignore *.pyc *.log .DS_Store --- NEW FILE: twistedEchoClient.py --- """ Twisted PythonCard PbEchoClient """ from PythonCard import model, twistedModel from twisted.cred.credentials import UsernamePassword from twisted.spread import pb from twisted.internet import reactor class DefinedError(pb.Error): pass class EchoClient(model.Background): """ TPC PB Echo GUI Panel """ def on_initialize(self, event): self.pbfactory = pb.PBClientFactory() # KEA the Send button and SendTextField should be disabled # until a successful login self.components.SendTextField.enabled = False self.components.buttonSend.enabled = False def on_SendTextField_keyPress(self, event): # if user presses return, send text if event.keyCode == 13: self.sendAndClearText() else: event.skip() # KEA 2004-04-27 # this should popup a custom dialog # to prompt the user for the host, port number, # username, and password # with defaults of "localhost", pb.portno # "guest", and "guest" # this dialog is going to be pretty common so we'll stick # in PythonCard/templates/dialogs to simplify usage from # other twisted apps def on_buttonLogin_mouseClick(self, event): reactor.connectTCP("localhost", pb.portno, self.pbfactory) self.pbfactory.login( UsernamePassword("guest", "guest") ).addCallbacks(self.loginsuccess, self.loginfailure) def loginsuccess(self, perspective): self.statusBar.text = 'Connected' self.components.SendTextField.enabled = True self.components.buttonSend.enabled = True self.components.SendTextField.setFocus() self.perspective = perspective def loginfailure(self, error): self.displaycontent("Error on login: %s" % error) def sendAndClearText(self): fld = self.components.SendTextField self.perspective.callRemote('echo', fld.text ).addCallbacks(self.echosuccess, self.echofailure) fld.text = "" def on_buttonSend_mouseClick(self, event): self.sendAndClearText() def echosuccess(self, message): self.displaycontent(message) def echofailure(self, error): t = error.trap(DefinedError) self.displaycontent("error received"+t) def displaycontent(self, text): self.components.ReceivedTextArea.appendText(text + "\n") if __name__ == '__main__': app = twistedModel.TwistedApplication(EchoClient) app.MainLoop() --- NEW FILE: readme.txt --- Twisted Echo client which uses the TwistedApplication class. class TwistedApplication(model.Application): def OnInit(self): model.Application.OnInit(self) reactor.startRunning() wx.EVT_TIMER(self, 999999, self.OnTimer) self.twistedTimer = wx.Timer(self, 999999) self.twistedTimer.Start(250, False) return True def OnTimer(self, event): reactor.runUntilCurrent() reactor.doIteration(0) def OnExit(self): # need to stop the timer for cleanup purposes self.twistedTimer.Stop() self.twistedTimer = None reactor.stop() You need to start pbecho.py first so you have a server to connect to. pbecho.py is included in the Twisted distribution within your Python site-packages directory: site-packages/TwistedDocs/examples/pbecho.py Contributed by Stephen Waterbury. Additional code by Kevin Altis Adapted from Uwe C. Schroeder's cookbook entry "Using wxPython with Twisted Python" http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/181780 |
From: Kevin A. <ka...@us...> - 2004-04-27 22:03:15
|
Update of /cvsroot/pythoncard/PythonCard/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17350/samples Modified Files: samples.rsrc.py Log Message: added TwistedApplication subclass for writing Twisted GUI apps added twistedEchoClient sample Index: samples.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/samples.rsrc.py,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** samples.rsrc.py 24 Apr 2004 06:49:46 -0000 1.53 --- samples.rsrc.py 27 Apr 2004 22:03:05 -0000 1.54 *************** *** 64,68 **** 'simpleBrowser', 'simpleIEBrowser', 'slideshow', 'sounds', 'SourceForgeTracker', \ 'spirograph', 'stockprice', 'textIndexer', 'textRouter', \ ! 'tictactoe', 'turtle', 'webgrabber', 'webserver', 'widgets', 'worldclock'], 'stringSelection':'minimal', }, --- 64,69 ---- 'simpleBrowser', 'simpleIEBrowser', 'slideshow', 'sounds', 'SourceForgeTracker', \ 'spirograph', 'stockprice', 'textIndexer', 'textRouter', \ ! 'tictactoe', 'turtle', 'twistedEchoClient', \ ! 'webgrabber', 'webserver', 'widgets', 'worldclock'], 'stringSelection':'minimal', }, |