Changeset 5959

Show
Ignore:
Timestamp:
08/22/2010 01:18:49 PM (1 year ago)
Author:
ed
Message:

Converted all the old log calls to use the new style of logging.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ide/ClassDesigner.py

    r5922 r5959  
    496496 
    497497    def onEditUndo(self, evt): 
    498         dabo.infoLog.write(_("Not implemented yet")) 
     498        dabo.log.info(_("Not implemented yet")) 
    499499    def onEditRedo(self, evt): 
    500         dabo.infoLog.write(_("Not implemented yet")) 
     500        dabo.log.info(_("Not implemented yet")) 
    501501 
    502502 
     
    12311231            except ValueError: 
    12321232                # Should never happen, so if it does, log it! 
    1233                 dabo.errorLog.write("Invalid wizard page class: %s" % nm) 
     1233                dabo.log.error("Invalid wizard page class: %s" % nm) 
    12341234                dabo.ui.stop("Invalid wizard page class: %s" % nm) 
    12351235                pgDct["fullname"] = nm 
     
    22452245            del self._classPropDict[obj][prop] 
    22462246        except StandardError, e: 
    2247             dabo.errorLog.write(_("Could not delete custom property '%(prop)s': %(e)s") 
     2247            dabo.log.error(_("Could not delete custom property '%(prop)s': %(e)s") 
    22482248                    % locals()) 
    22492249 
     
    24802480                    ret = lps[0] 
    24812481                except: 
    2482                     dabo.errorLog.write(_("Problem adding to a page: no ClassDesigner information.")) 
     2482                    dabo.log.error(_("Problem adding to a page: no ClassDesigner information.")) 
    24832483            else: 
    24842484                ret = obj.mainPanel 
     
    27162716            if szit is None: 
    27172717                # Something is wrong; write it to the log and return 
    2718                 dabo.errorLog.write(_("Attempted to add an object of class %(cls)s to parent %(pnl)s, but parent has no sizer information.") 
     2718                dabo.log.error(_("Attempted to add an object of class %(cls)s to parent %(pnl)s, but parent has no sizer information.") 
    27192719                        % locals()) 
    27202720                return 
     
    33123312                            self.setCustomChanges(kid, kidDct) 
    33133313                        except StandardError, e: 
    3314                             dabo.errorLog.write(_("Error locating sizer: %s") % e) 
     3314                            dabo.log.error(_("Error locating sizer: %s") % e) 
    33153315        else: 
    33163316            if obj.Sizer: 
     
    33223322                    self.setCustomChanges(obj.Sizer, szDct) 
    33233323                except StandardError, e: 
    3324                     dabo.errorLog.write(_("Error locating sizer: %s") % e) 
     3324                    dabo.log.error(_("Error locating sizer: %s") % e) 
    33253325            else: 
    33263326                if obj.Children: 
     
    33353335                            self.setCustomChanges(kid, kidDct) 
    33363336                        except StandardError, e: 
    3337                             dabo.errorLog.write(_("Error locating child object: %s") % e) 
     3337                            dabo.log.error(_("Error locating child object: %s") % e) 
    33383338 
    33393339 
  • trunk/ide/ClassDesignerComponents.py

    r5922 r5959  
    461461                        sz = self.Sizer 
    462462                    except AttributeError: 
    463                         dabo.errorLog.write(_("No sizer information available for %s") % self) 
     463                        dabo.log.error(_("No sizer information available for %s") % self) 
    464464                        sz = None 
    465465        if sz: 
     
    16341634        """Swaps the location of the two objects.""" 
    16351635        if not obj1 or not obj2: 
    1636             dabo.errorLog.write(_("Cannot swap with non-existent object.")) 
     1636            dabo.log.error(_("Cannot swap with non-existent object.")) 
    16371637            return 
    16381638        row1, col1 = self.getGridPos(obj1) 
  • trunk/ide/ClassDesignerEditor.py

    r5922 r5959  
    4545        if not obj: 
    4646            # Should never happen! 
    47             dabo.ErrorLog.write(_("Bad object ref returned to _makeContainingClassIntoSelf()")) 
     47            dabo.log.error(_("Bad object ref returned to _makeContainingClassIntoSelf()")) 
    4848            return None 
    4949        try: 
     
    6868            except SyntaxError, e: 
    6969                # Record the error so that the developer knows there is a problem. 
    70                 dabo.errorLog.write(_("Compilation error found in import code: %s") % e) 
     70                dabo.log.error(_("Compilation error found in import code: %s") % e) 
    7171            except ImportError: 
    7272                # Ignore because it is not a code problem and will show up on runtime. 
     
    544544                    keylist.append(obj) 
    545545                except: 
    546                     dabo.errorLog.write(_("Could not add to hierarchy: %s") % obj) 
     546                    dabo.log.error(_("Could not add to hierarchy: %s") % obj) 
    547547            self.ddObject.Choices = chc 
    548548            self.ddObject.Keys = keylist 
  • trunk/ide/ClassDesignerPropSheet.py

    r5835 r5959  
    727727                    pass 
    728728                else: 
    729                     dabo.errorLog.write(_("Property Grid out of sync for property '%s' of object '%'") % 
     729                    dabo.log.error(_("Property Grid out of sync for property '%s' of object '%'") % 
    730730                            (self.getValue(row, 0), self.Application.Selection[0])) 
    731731                continue 
  • trunk/ide/CxnEditor.py

    r5940 r5959  
    429429            # Make sure that the passed file exists! 
    430430            if not os.path.exists(self.connFile): 
    431                 dabo.errorLog.write("The connection file '%s' does not exist." % self.connFile) 
     431                dabo.log.error("The connection file '%s' does not exist." % self.connFile) 
    432432                self.connFile = None 
    433433 
  • trunk/ide/Editor.py

    r5835 r5959  
    259259            pg = pgs[0] 
    260260        else: 
    261             dabo.errorLog.write(_("No matching page for %s") % cap) 
     261            dabo.log.error(_("No matching page for %s") % cap) 
    262262            return 
    263263        self.SelectedPage = pg 
     
    554554        # Eventually, a separate IDE window can optionally display help contents 
    555555        # for the object. For now, just print the longdoc to the infolog. 
    556         dabo.infoLog.write(_("Documentation Hint received:\n\n%s") % evt.EventData["longDoc"]) 
     556        dabo.log.info(_("Documentation Hint received:\n\n%s") % evt.EventData["longDoc"]) 
    557557 
    558558 
     
    801801        except StandardError, e: 
    802802            if justReportErrors: 
    803                 dabo.errorLog.write(_("Could not open file: %s") % e) 
     803                dabo.log.error(_("Could not open file: %s") % e) 
    804804                target = None 
    805805            else: 
  • trunk/ide/wizards/AppWizard/AppWizard.py

    r5928 r5959  
    959959                    } 
    960960        else: 
    961             dabo.errorLog.write("No control class found for field '%(fieldName)s'.") 
     961            dabo.log.error("No control class found for field '%(fieldName)s'.") 
    962962            lbl.release() 
    963963            opList.release() 
  • trunk/ide/wizards/AppWizard/spec-main.py.txt

    r5835 r5959  
    2525app.biz = biz 
    2626app.ui = ui 
    27  
    28 # If we are running frozen, let's reroute the errorLog: 
    29 if hasattr(sys, "frozen"): 
    30     dabo.errorLog.Caption = "" 
    31     dabo.errorLog.LogObject = open(os.path.join(app.HomeDirectory, 
    32             "error.log"), "a") 
    3327 
    3428# Make it easy to find any images or other files you put in the resources