From: Alex T. <ale...@us...> - 2004-10-10 23:05:16
|
Update of /cvsroot/pythoncard/PythonCard/tools/oneEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11705/tools/oneEditor Modified Files: codePage.py tabcodeEditor.py todo.txt Log Message: Allow saveFile to work in CheckSyntax; fix syntax error production. Index: tabcodeEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/oneEditor/tabcodeEditor.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tabcodeEditor.py 9 Oct 2004 18:31:08 -0000 1.6 --- tabcodeEditor.py 10 Oct 2004 23:02:08 -0000 1.7 *************** *** 229,232 **** --- 229,233 ---- self.currentDocument.LineFromPosition(pos) + 1, self.currentDocument.GetColumn(pos) + 1) + #print "updatestatusbar", self.lastPos, pos, self.lastStatus, newText if self.lastStatus != newText: self.statusBar.text = newText *************** *** 1082,1092 **** else: if self.on_menuFileSaveAs_select(None): ! scriptutils.CheckFile(self, self.currentPage.documentPath) self.lastPos = self.currentDocument.GetCurrentPos() else: if self.currentDocument.GetModify(): # auto-save ! self.saveFile(self.currentPage.documentPath) ! scriptutils.CheckFile(self, self.currentPage.documentPath) self.lastPos = self.currentDocument.GetCurrentPos() --- 1083,1093 ---- else: if self.on_menuFileSaveAs_select(None): ! scriptutils.CheckFile(self.statusBar, self.currentDocument, self.currentPage.documentPath) self.lastPos = self.currentDocument.GetCurrentPos() else: if self.currentDocument.GetModify(): # auto-save ! self.currentPage.saveFile(self.currentPage.documentPath) ! scriptutils.CheckFile(self.statusBar, self.currentDocument, self.currentPage.documentPath) self.lastPos = self.currentDocument.GetCurrentPos() *************** *** 1118,1122 **** elif self.currentDocument.GetModify(): # auto-save ! self.saveFile(self.currentPage.documentPath) # this algorithm, taken from samples.py assumes the rsrc.py file and the main --- 1119,1123 ---- elif self.currentDocument.GetModify(): # auto-save ! self.currentPage.saveFile(self.currentPage.documentPath) # this algorithm, taken from samples.py assumes the rsrc.py file and the main Index: todo.txt =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/oneEditor/todo.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** todo.txt 3 Oct 2004 23:58:01 -0000 1.1 --- todo.txt 10 Oct 2004 23:02:08 -0000 1.2 *************** *** 1,4 **** ! - figure out initial sizing issues ! - close button / menu item to close current page - add menu and command items to drop-downs - key / shortcut to take you to the drop-down (if possible) ? --- 1,8 ---- ! - figure out initial sizing issues DONE ! - close button / menu item to close current page DONE - add menu and command items to drop-downs - key / shortcut to take you to the drop-down (if possible) ? + - statusBar and title mechanism. + Problem with syntax check untitled doc which is then saved. + syntax message goes into statusBar, but because the text + has changed (new file name), on_idle overwrites the error message. \ No newline at end of file Index: codePage.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/oneEditor/codePage.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** codePage.py 5 Oct 2004 12:08:22 -0000 1.2 --- codePage.py 10 Oct 2004 23:02:08 -0000 1.3 *************** *** 122,126 **** def saveFile(self, path): ! try: f = open(path, 'wb') try: --- 122,126 ---- def saveFile(self, path): ! if True: f = open(path, 'wb') try: *************** *** 131,139 **** os.chdir(os.path.dirname(self.documentPath)) self.components.document.SetSavePoint() - self.title = os.path.split(path)[-1] + ' - ' + self.startTitle #self.statusBar.text = path self.lastStatus = None self.setEditorStyle() ! except: pass --- 131,139 ---- os.chdir(os.path.dirname(self.documentPath)) self.components.document.SetSavePoint() #self.statusBar.text = path self.lastStatus = None self.setEditorStyle() ! self.topLevelParent.setTitleBar(os.path.split(path)[-1]) ! else: pass |