From: Kevin A. <ka...@us...> - 2004-08-12 19:14:34
|
Update of /cvsroot/pythoncard/PythonCard/tools/textEditor/scriptlets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15782/textEditor/scriptlets Modified Files: documentWordCount.py selectionWordCount.py Log Message: getCommandLineArgs moved to util.py runOptionsDialog moved to templates.dialogs.runOptionsDialog.py dialog.py is now a thin wrapper around wx.lib.dialogs.py all dialog results now use DialogResults class instead of dictionary e.g. result.accepted instead of result['accepted'] see dialogs sample and other samples and tools for examples of change Index: documentWordCount.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/textEditor/scriptlets/documentWordCount.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** documentWordCount.py 8 Apr 2004 20:56:50 -0000 1.4 --- documentWordCount.py 12 Aug 2004 19:14:24 -0000 1.5 *************** *** 1,2 **** --- 1,3 ---- + import wx from PythonCard import dialog *************** *** 14,16 **** filename = os.path.basename(bg.documentPath) ! dialog.MessageDialog(bg, "Document: %s\n" % filename + "%d chars, %d words, %d lines" % wordCount(bg.components.fldDocument.text), 'Word Count', dialog.ICON_INFORMATION, dialog.BUTTON_OK) --- 15,17 ---- filename = os.path.basename(bg.documentPath) ! dialog.MessageDialog(bg, "Document: %s\n" % filename + "%d chars, %d words, %d lines" % wordCount(bg.components.fldDocument.text), 'Word Count', wx.ICON_INFORMATION | wx.OK) Index: selectionWordCount.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/textEditor/scriptlets/selectionWordCount.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** selectionWordCount.py 8 Apr 2004 20:56:50 -0000 1.4 --- selectionWordCount.py 12 Aug 2004 19:14:24 -0000 1.5 *************** *** 1,2 **** --- 1,3 ---- + import wx from PythonCard import dialog *************** *** 15,17 **** text = bg.components.fldDocument.getStringSelection() ! dialog.MessageDialog(bg, "Document: %s\n" % filename + "%d chars, %d words, %d lines" % wordCount(text), 'Word Count', dialog.ICON_INFORMATION, dialog.BUTTON_OK) --- 16,18 ---- text = bg.components.fldDocument.getStringSelection() ! dialog.MessageDialog(bg, "Document: %s\n" % filename + "%d chars, %d words, %d lines" % wordCount(text), 'Word Count', wx.ICON_INFORMATION | wx.OK) |