Changeset 4296
- Timestamp:
- 07/19/08 10:02:07 (4 months ago)
- Files:
-
- trunk/ide/ClassDesigner.py (modified) (1 diff)
- trunk/ide/ClassDesignerEditor.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ide/ClassDesigner.py
r4218 r4296 1153 1153 dlg = ImportEditDialog(None, BasePrefKey=self.BasePrefKey+".ImportEditDialog") 1154 1154 dlg.edtImport.Text = txt 1155 dlg.show() 1156 if dlg.Accepted: 1157 self._classImportDict[frm] = dlg.edtImport.Text 1155 showDialog = True 1156 while showDialog: 1157 dlg.show() 1158 showDialog = dlg.Accepted 1159 if showDialog: 1160 # Check the syntax before storing 1161 txt = dlg.edtImport.Text 1162 try: 1163 compile(txt.strip(), "", "exec") 1164 self._classImportDict[frm] = txt 1165 showDialog = dlg.Accepted = False 1166 except SyntaxError, e: 1167 errMsg = _("Syntax Error: %s") % e 1168 dabo.ui.stop(errMsg, _("Error Compiling Import Declarations")) 1158 1169 dlg.release() 1159 1170 trunk/ide/ClassDesignerEditor.py
r4292 r4296 65 65 try: 66 66 exec imp in self._namespaces 67 except SyntaxError: 68 pass #Just let namespace import fail. 67 except SyntaxError, e: 68 # Record the error so that the developer knows there is a problem. 69 dabo.errorLog.write(_("Compilation error found in import code: %s") % e) 69 70 70 71
