From: Kevin A. <ka...@us...> - 2004-08-12 19:40:49
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21082 Modified Files: flatfileDatabase.py gadflyDatabase.py Log Message: 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: flatfileDatabase.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/flatfileDatabase.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** flatfileDatabase.py 3 Aug 2004 15:57:32 -0000 1.23 --- flatfileDatabase.py 12 Aug 2004 19:40:39 -0000 1.24 *************** *** 578,583 **** def sortRecords(self, name=None): result = dialog.singleChoiceDialog(self.view, "Sort", "Sort cards by field:", self.sortableFields) ! if result['accepted']: ! self.sortByFieldName(result['selection']) def updateStatusBar(self): --- 578,583 ---- def sortRecords(self, name=None): result = dialog.singleChoiceDialog(self.view, "Sort", "Sort cards by field:", self.sortableFields) ! if result.accepted: ! self.sortByFieldName(result.selection) def updateStatusBar(self): *************** *** 808,814 **** # this version doesn't alert the user if the line number is out-of-range # it just fails quietly ! if result['accepted']: try: ! i = int(result['text']) if i > 0: self.document.goRecord(i - 1) --- 808,814 ---- # this version doesn't alert the user if the line number is out-of-range # it just fails quietly ! if result.accepted: try: ! i = int(result.text) if i > 0: self.document.goRecord(i - 1) *************** *** 856,866 **** searchableFields ) ! if result['accepted']: startTime = time.time() ! self.lastFind['searchText'] = result['searchText'] ! self.lastFind['wholeWordsOnly'] = result['wholeWordsOnly'] ! self.lastFind['caseSensitive'] = result['caseSensitive'] ! self.lastFind['searchField'] = result['searchField'] self.document.findRecord(self.lastFind['searchText'], self.lastFind['caseSensitive'], --- 856,866 ---- searchableFields ) ! if result.accepted: startTime = time.time() ! self.lastFind['searchText'] = result.searchText ! self.lastFind['wholeWordsOnly'] = result.wholeWordsOnly ! self.lastFind['caseSensitive'] = result.caseSensitive ! self.lastFind['searchField'] = result.searchField self.document.findRecord(self.lastFind['searchText'], self.lastFind['caseSensitive'], Index: gadflyDatabase.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/gadflyDatabase.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** gadflyDatabase.py 14 Apr 2004 02:38:47 -0000 1.10 --- gadflyDatabase.py 12 Aug 2004 19:40:39 -0000 1.11 *************** *** 9,13 **** """ ! from PythonCard import dialog, log, model, util from PythonCard import flatfileDatabase import os, sys --- 9,13 ---- """ ! from PythonCard import log, model from PythonCard import flatfileDatabase import os, sys |