Changeset 3199

Show
Ignore:
Timestamp:
06/22/07 10:00:34 (2 years ago)
Author:
paul
Message:

After this morning's reverts, I was still finding at least one error (the metaclass-base one
that I discuss in the tracker item).

Because of all the noise in the 3194 commit, due I guess to Dj's editor fixing whitespace at
the end of lines, I gave up trying to locate the source of the problem in the diff.

This commit reverts trunk back to where it was at 3193, but includes Ed's 3195 commit
on dSizerMixin.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/__init__.py

    r3198 r3199  
    44Dabo is for developing multi-platform database business applications - 
    55you know, applications that need to connect to a database server (MySQL, 
    6 Oracle, MS-SQL, whatever), get recordsets of data based on criteria 
    7 set by the user, provide easy ways to edit and commit changes to the 
     6Oracle, MS-SQL, whatever), get recordsets of data based on criteria  
     7set by the user, provide easy ways to edit and commit changes to the  
    88data, and to report on the data. 
    99 
    10 For basic, easy use that hopefully satisfies 80% of your needs, you 
     10For basic, easy use that hopefully satisfies 80% of your needs, you  
    1111simply create/edit data definition files that Dabo uses to dynamically 
    1212create things like menus, edit forms, data browsing grids, etc. 
    1313 
    1414So, the basic idea is that you have a functional, working, albeit basic 
    15 application up and running very quickly, and you can then spend time 
    16 getting all the fancy bells and whistles implemented. Keep things as 
    17 simple as possible though, while still fulfilling your customer's 
     15application up and running very quickly, and you can then spend time  
     16getting all the fancy bells and whistles implemented. Keep things as  
     17simple as possible though, while still fulfilling your customer's  
    1818specifications. Simplicity is the better part of elegance. 
    1919 
     
    3636The Dabo framework will have to be distributed to your client's machine(s), 
    3737along with your project-specific data definitions and (if applicable), your 
    38 subclasses of the Dabo classes and additional Python scripts, if any. There 
    39 are ways to do runtime deployment via installers that take the complexity 
     38subclasses of the Dabo classes and additional Python scripts, if any. There  
     39are ways to do runtime deployment via installers that take the complexity  
    4040out of this, but that is outside the scope of Dabo itself, and you'll use 
    4141a different method for each target platform. 
     
    4949        db layer, or the db layer in conjunction with the biz 
    5050        layer, with no ui at all.) 
    51  
    52     + SQLite3: this is used internally for managing preferences, as 
     51     
     52    + SQLite3: this is used internally for managing preferences, as  
    5353        well as for cursor management. 
    54  
    55     +   pysqlite2: The Python dbapi module for SQLite. (Not needed in 
     54     
     55    +   pysqlite2: The Python dbapi module for SQLite. (Not needed in  
    5656            Python 2.5 and higher) 
    5757 
     
    6060    + Linux 2.4 with X11 running and Gtk2 
    6161 
    62     + Access to some sort of database server, along with the 
     62    + Access to some sort of database server, along with the  
    6363    appropriate Python driver(s) installed. For example, for 
    6464    MySQL you'll need to have the MySQL client libraries 
     
    6767    DB API coupled with the individual database drivers. This 
    6868    is, at the same time, less flexible, tougher to get started 
    69     with, but more capable, more multi-platform, and better 
     69    with, but more capable, more multi-platform, and better  
    7070    performing, than ODBC is.) (we recommend starting with MySQL 
    7171    installed, because all of the demo code has the best support 
     
    7474How you get started is pretty much up to you. Look at the code in the 
    7575separate dabodemo project. Run the AppWizard in the separate daboide 
    76 project. Hand-edit the data definition files and Python code that the 
     76project. Hand-edit the data definition files and Python code that the  
    7777AppWizard generates for you. 
    7878 
     
    9898    print tb.Value 
    9999 
    100 Have fun in your exploration of Dabo. 
     100Have fun in your exploration of Dabo.  
    101101""" 
    102102 
     
    116116pysqlite2: http://initd.org/tracker/pysqlite 
    117117 
    118 """ 
     118"""     
    119119        sys.exit(msg) 
    120120 
     
    131131errorLog.Caption = "Dabo Error Log" 
    132132errorLog.LogObject = sys.stderr 
    133 # This log is set to None by default. It must be manually activated 
     133# This log is set to None by default. It must be manually activated  
    134134# via the Application object. 
    135135dbActivityLog = Log() 
    136136dbActivityLog.Caption = "Database Activity Log" 
    137137dbActivityLog.LogObject = None 
    138  
    139 def logInfo(msg, *args, **kwargs): 
    140     infoLog.write(msg) 
    141 def logError(msg, *args, **kwargs): 
    142     errorLog.write(msg) 
    143 def logDBActivity(msg, *args, **kwargs): 
    144     dbActivityLog.write(msg) 
    145  
    146138 
    147139# Import global settings (do this first, as other imports may rely on it): 
  • trunk/dabo/dApp.py

    r3194 r3199  
    2828        """Add the object reference to the collection.""" 
    2929        self.append(objRef) 
    30  
     30         
    3131 
    3232    def remove(self, objRef): 
     
    4242 
    4343class TempFileHolder(object): 
    44     """Utility class to get temporary file names and to make sure they are 
     44    """Utility class to get temporary file names and to make sure they are  
    4545    deleted when the Python session ends. 
    4646    """ 
     
    5151    def __del__(self): 
    5252        self._eraseTempFiles() 
    53  
    54  
     53         
     54         
    5555    def _eraseTempFiles(self): 
    5656        # Try to erase all temp files created during life. 
     
    7070            # In these rare cases, Python has already 'gone away', so just bail 
    7171            pass 
    72  
    73  
     72     
     73     
    7474    def release(self): 
    75         self._eraseTempFiles() 
     75        self._eraseTempFiles()      
    7676 
    7777 
     
    117117    and lives through the life of the application. 
    118118 
    119         -- set up an empty data connections object which holds 
    120         -- connectInfo objects connected to pretty names. If there 
     119        -- set up an empty data connections object which holds  
     120        -- connectInfo objects connected to pretty names. If there  
    121121        -- is a file named 'default.cnxml' present, it will import the 
    122122        -- connection definitions contained in that. If no file of that 
    123123        -- name exists, it will import any .cnxml file it finds. If there 
    124124        -- are no such files, it will then revert to the old behavior 
    125         -- of importing a file in the current directory called 
     125        -- of importing a file in the current directory called  
    126126        -- 'dbConnectionDefs.py', which contains connection 
    127127        -- definitions in python code format instead of XML. 
     
    133133        -- decide which ui to use (wx) and gets that ball rolling 
    134134 
    135         -- look for a MainForm in an expected place, otherwise use default dabo 
    136         -- dMainForm, and instantiate that. 
     135        -- look for a MainForm in an expected place, otherwise use default dabo  
     136        -- dMainForm, and instantiate that.  
    137137 
    138138        -- maintain a forms collection and provide interfaces for 
     
    146146    _call_beforeInit, _call_afterInit, _call_initProperties = False, False, True 
    147147    # Behaviors which are normal in the framework may need to 
    148     # be modified when run as the Designer. This flag will 
     148    # be modified when run as the Designer. This flag will  
    149149    # distinguish between the two states. 
    150150    isDesigner = False 
    151151 
    152  
     152     
    153153    def __init__(self, selfStart=False, properties=None, *args, **kwargs): 
    154154        self._uiAlreadySet = False 
     
    163163        self.splashMaskColor = self._extractKey(kwargs, "splashMaskColor", None) 
    164164        self.splashTimeout = self._extractKey(kwargs, "splashTimeout", 5000) 
    165  
     165         
    166166        super(dApp, self).__init__(properties, *args, **kwargs) 
    167167        # egl: added the option of keeping the main form hidden 
     
    179179 
    180180        # List of form classes to open on App Startup 
    181         self.formsToOpen = [] 
     181        self.formsToOpen = []   
    182182        # Form to open if no forms were passed as a parameter 
    183183        self.default_form = None 
     
    192192        self._afterInit() 
    193193        self.autoBindEvents() 
    194  
     194         
    195195 
    196196    def __del__(self): 
    197197        """Make sure that temp files are removed""" 
    198198        self._tempFileHolder.release() 
    199  
     199         
    200200 
    201201    def setup(self, initUI=True): 
     
    204204        if self.HomeDirectory not in sys.path: 
    205205            sys.path.append(self.HomeDirectory) 
    206  
     206         
    207207        def initAppInfo(item, default): 
    208208            if not self.getAppInfo(item): 
     
    215215 
    216216        self._initDB() 
    217  
     217         
    218218        if initUI: 
    219219            self._initUI() 
     
    233233 
    234234    def startupForms(self): 
    235         """Open one or more of the defined forms. The default one is specified 
    236         in .default_form. If form names were passed on the command line, 
     235        """Open one or more of the defined forms. The default one is specified  
     236        in .default_form. If form names were passed on the command line,  
    237237        they will be opened instead of the default one as long as they exist. 
    238238        """ 
     
    249249 
    250250    def initUIApp(self): 
    251         """Callback from the initial app setup. Used to allow the 
     251        """Callback from the initial app setup. Used to allow the  
    252252        splash screen, if any, to be shown quickly. 
    253253        """ 
    254254        self.uiApp.setup() 
    255  
    256  
     255         
     256     
    257257    def start(self): 
    258258        """Start the application event loop.""" 
     
    261261            # call start() 
    262262            self.setup() 
    263  
     263             
    264264        if (not self.SecurityManager or not self.SecurityManager.RequireAppLogin 
    265265            or self.SecurityManager.login()): 
    266  
     266             
    267267            userName = self.getUserCaption() 
    268268            if userName: 
     
    270270            else: 
    271271                userName = "" 
    272  
     272             
    273273            self._retrieveMRUs() 
    274274            self.uiApp.start(self) 
    275275        self.finish() 
    276  
    277  
     276     
     277     
    278278    def finish(self): 
    279279        """Called when the application event loop has ended.""" 
     
    282282        self.closeConnections() 
    283283        self._tempFileHolder.release() 
    284         dabo.logInfo(_("Application finished.")) 
     284        dabo.infoLog.write(_("Application finished.")) 
    285285 
    286286 
     
    288288        """Return the user/password to dSecurityManager.login(). 
    289289 
    290         The default is to display the standard login dialog, and return the 
     290        The default is to display the standard login dialog, and return the  
    291291        user/password as entered by the user, but subclasses can override to get 
    292292        the information from whereever is appropriate. 
     
    300300        user, password = ld.user, ld.password 
    301301        return user, password 
    302  
    303  
     302     
     303     
    304304    def _persistMRU(self): 
    305305        """Persist any MRU lists to disk.""" 
    306306        base = "MRU.%s" % self.getAppInfo("appName") 
    307         self.deleteAllUserSettings(base) 
     307        self.deleteAllUserSettings(base)        
    308308        for cap in self._persistentMRUs.keys(): 
    309309            mruList = self.uiApp.getMRUListForMenu(cap) 
    310310            setName = ".".join((base, cap)) 
    311311            self.setUserSetting(setName, mruList) 
    312  
    313  
     312     
     313     
    314314    def _retrieveMRUs(self): 
    315315        """Retrieve any saved MRU lists.""" 
     
    321321                for itm in itms: 
    322322                    self.uiApp.addToMRU(cap, itm, fcn) 
    323  
     323         
    324324 
    325325    def getAppInfo(self, item): 
     
    339339    def getUserSettingKeys(self, spec): 
    340340        """Return a list of all keys underneath <spec> in the user settings table. 
    341  
     341         
    342342        For example, if spec is "appWizard.dbDefaults", and there are 
    343343        userSettings entries for: 
     
    345345            appWizard.dbDefaults.pkm.User 
    346346            appWizard.dbDefaults.egl.Host 
    347  
     347             
    348348        The return value would be ["pkm", "egl"] 
    349349        """ 
     
    367367        if usp: 
    368368            usp.setUserSetting(item, value) 
    369  
    370  
     369     
     370     
    371371    def setUserSettings(self, setDict): 
    372372        """Convenience method for setting several settings with one 
     
    376376        if usp: 
    377377            usp.setUserSettings(setDict) 
    378  
    379  
     378     
     379     
    380380    def deleteUserSetting(self, item): 
    381381        """Removes the given item from the user settings file.""" 
     
    383383        if usp: 
    384384            usp.deleteUserSetting(item) 
    385  
    386  
     385     
     386     
    387387    def deleteAllUserSettings(self, spec): 
    388388        """Deletes all settings that begin with the supplied spec.""" 
     
    390390        if usp: 
    391391            usp.deleteAllUserSettings(spec) 
    392  
    393  
     392         
     393         
    394394    def getUserCaption(self): 
    395395        """ Return the full name of the currently logged-on user.""" 
     
    430430    # to the Crypto object 
    431431    def encrypt(self, val): 
    432         """Return the encrypted string value. The request is passed 
     432        """Return the encrypted string value. The request is passed  
    433433        to the Crypto object for processing. 
    434434        """ 
    435435        return self.Crypto.encrypt(val) 
    436  
     436         
    437437 
    438438    def decrypt(self, val): 
    439         """Return decrypted string value. The request is passed to 
     439        """Return decrypted string value. The request is passed to  
    440440        the Crypto object for processing. 
    441441        """ 
    442442        return self.Crypto.decrypt(val) 
    443443 
    444  
     444     
    445445    def getCharset(self): 
    446446        """Returns one of 'unicode' or 'ascii'.""" 
    447447        return self.uiApp.charset 
    448  
    449  
     448         
     449         
    450450    def _initProperties(self): 
    451451        """ Initialize the public properties of the app object.""" 
     
    467467        super(dApp, self)._initProperties() 
    468468 
    469  
     469         
    470470    def _initDB(self): 
    471         """Set the available connection definitions for use by the app. 
     471        """Set the available connection definitions for use by the app.  
    472472 
    473473        First read in all .cnxml files. If no such XML definition files exist, 
     
    485485                    for kk in cn.keys(): 
    486486                        self.dbConnectionNameToFiles[kk] = f 
    487  
     487         
    488488        # Import any python code connection definitions (the "old" way). 
    489489        try: 
     
    495495        except: 
    496496            pass 
    497  
    498         # For each connection definition, add an entry to 
    499         # self.dbConnectionDefs that contains a key on the 
     497         
     498        # For each connection definition, add an entry to  
     499        # self.dbConnectionDefs that contains a key on the  
    500500        # name, and a value of a dConnectInfo object. 
    501501        for k,v in connDefs.items(): 
     
    504504            self.dbConnectionDefs[k] = ci 
    505505 
    506         dabo.logInfo(_("%s database connection definition(s) loaded.") 
     506        dabo.infoLog.write(_("%s database connection definition(s) loaded.")  
    507507            % (len(self.dbConnectionDefs))) 
    508508 
    509509 
    510510    def _initUI(self): 
    511         """ Set the user-interface library for the application. Ignored 
     511        """ Set the user-interface library for the application. Ignored  
    512512        if the UI was already explicitly set by user code. 
    513513        """ 
     
    519519        else: 
    520520            # Custom app code or the dabo.ui module already set this: don't touch 
    521             dabo.logInfo(_("User interface already set to '%s', so dApp didn't touch it.") 
     521            dabo.infoLog.write(_("User interface already set to '%s', so dApp didn't touch it.")  
    522522                    % self.UI) 
    523523 
     
    539539            ret = None 
    540540        return ret 
    541  
    542  
     541     
     542     
    543543    def getConnectionNames(self): 
    544544        """Returns a list of all defined connection names""" 
    545545        return self.dbConnectionDefs.keys() 
    546  
    547  
     546         
     547         
    548548    def closeConnections(self): 
    549549        """Cleanup as the app is exiting.""" 
     
    553553            except: 
    554554                pass 
    555  
    556  
     555     
     556     
    557557    def addConnectInfo(self, ci, name=None): 
    558558        if name is None: 
     
    564564        self.dbConnectionDefs[name] = ci 
    565565        self.dbConnectionNameToFiles[name] = None 
    566  
     566     
    567567 
    568568    def addConnectFile(self, connFile): 
     
    583583        if os.path.exists(connFile): 
    584584            connDefs = importConnections(connFile) 
    585             # For each connection definition, add an entry to 
    586             # self.dbConnectionDefs that contains a key on the 
     585            # For each connection definition, add an entry to  
     586            # self.dbConnectionDefs that contains a key on the  
    587587            # name, and a value of a dConnectInfo object. 
    588588            for k,v in connDefs.items(): 
     
    591591                self.dbConnectionDefs[k] = ci 
    592592                self.dbConnectionNameToFiles[k] = connFile 
    593  
     593     
    594594    def showCommandWindow(self, context=None): 
    595595        """Shows a command window with a full Python interpreter. 
    596596 
    597597        This is great for debugging during development, but you should turn off 
    598         app.ShowCommandWindowMenu in production, perhaps leaving backdoor 
     598        app.ShowCommandWindowMenu in production, perhaps leaving backdoor  
    599599        access to this function. 
    600600 
     
    657657    def onMenuOpenMRU(self, menu): 
    658658        self.uiApp.onMenuOpenMRU(menu) 
    659     ############################ 
    660  
    661  
     659    ############################    
     660     
     661     
    662662    def copyToClipboard(self, txt): 
    663663        """Place the passed text onto the clipboard.""" 
    664664        self.uiApp.copyToClipboard(txt) 
    665  
     665         
    666666 
    667667    def onHelpAbout(self, evt): 
     
    678678        dlg = about(frm) 
    679679        dlg.show() 
    680  
    681  
     680     
     681     
    682682    def addToAbout(self): 
    683683        """Adds additional app-specific information to the About form. 
    684684        This is just a stub method; override in subclasses if needed.""" 
    685685        pass 
    686  
    687  
     686     
     687     
    688688    def clearActiveForm(self, frm): 
    689689        """Called by the form when it is deactivated.""" 
     
    691691            self.uiApp.ActiveForm = None 
    692692 
    693  
     693     
    694694    def _getAboutFormClass(self): 
    695695        return getattr(self, "_aboutFormClass", None) 
     
    704704        else: 
    705705            return None 
    706  
     706             
    707707    def _setActiveForm(self, frm): 
    708708        if hasattr(self, "uiApp") and self.uiApp is not None: 
    709709            self.uiApp._setActiveForm(frm) 
    710710        else: 
    711             dabo.logError(_("Can't set ActiveForm: no uiApp.")) 
    712  
     711            dabo.errorLog.write(_("Can't set ActiveForm: no uiApp.")) 
     712     
    713713 
    714714    def _getBasePrefKey(self): 
     
    726726            except: pass 
    727727        if not ret: 
    728             dabo.logInfo(_("WARNING: No BasePrefKey has been set for this application.")) 
     728            dabo.infoLog.write(_("WARNING: No BasePrefKey has been set for this application.")) 
    729729            try: 
    730730                f = inspect.stack()[-1][1] 
     
    761761                f = open(val, "a") 
    762762            except: 
    763                 dabo.logError(_("Could not open file: '%s'") % val) 
     763                dabo.errorLog.write(_("Could not open file: '%s'") % val) 
    764764                return 
    765765        else: 
     
    770770    def _getDrawSizerOutlines(self): 
    771771        return self.uiApp.DrawSizerOutlines 
    772  
     772     
    773773    def _setDrawSizerOutlines(self, val): 
    774774        self.uiApp.DrawSizerOutlines = val 
    775  
     775     
    776776 
    777777    def _getEncoding(self): 
     
    780780            ret = dabo.defaultEncoding 
    781781        return ret 
    782  
     782         
    783783 
    784784    def _getHomeDirectory(self): 
     
    802802                # but the containing directory (the directory where the exe lives) 
    803803                hd = os.path.split(hd)[0] 
    804             self._homeDirectory = hd 
     804            self._homeDirectory = hd            
    805805        return hd 
    806  
     806         
    807807    def _setHomeDirectory(self, val): 
    808808        if os.path.exists(val): 
     
    818818        self._icon = val 
    819819 
    820  
     820                 
    821821    def _getMainForm(self): 
    822822        try: 
     
    826826            self._mainForm = None 
    827827        return frm 
    828  
     828             
    829829    def _setMainForm(self, val): 
    830830        self.uiApp.setMainForm(val) 
    831831        self._mainForm = val 
    832832 
    833  
     833                 
    834834    def _getMainFormClass(self): 
    835835        try: 
     
    839839            self._mainFormClass = cls 
    840840        return cls 
    841  
     841             
    842842    def _setMainFormClass(self, val): 
    843843        self._mainFormClass = val 
    844  
    845  
     844         
     845         
    846846    def _getNoneDisp(self): 
    847847        v = self._noneDisplay = getattr(self, "_noneDisplay", _("< None >")) 
     
    851851        assert isinstance(val, basestring) 
    852852        self._noneDisplay = val 
    853  
     853         
    854854 
    855855    def _getPlatform(self): 
     
    869869        except AttributeError: 
    870870            ## I've found that a value of 300 isn't too fast nor too slow: 
    871             # egl: 2006-11-16 - based on feedback from others, I'm 
     871            # egl: 2006-11-16 - based on feedback from others, I'm  
    872872            #   lengthening this to 500 ms. 
    873873            return 500 
    874  
     874             
    875875    def _setSearchDelay(self, value): 
    876         self._searchDelay = int(value) 
    877  
    878  
     876        self._searchDelay = int(value)          
     877 
     878             
    879879    def _getSecurityManager(self): 
    880880        try: 
     
    882882        except AttributeError: 
    883883            return None 
    884  
     884             
    885885    def _setSecurityManager(self, value): 
    886886        if isinstance(value, dSecurityManager.dSecurityManager): 
     
    890890        else: 
    891891            raise TypeError, _("SecurityManager must descend from dSecurityManager.") 
    892  
    893  
     892             
     893             
    894894    def _getShowCommandWindowMenu(self): 
    895895        try: 
     
    898898            v = self._showCommandWindowMenu = True 
    899899        return v 
    900  
     900             
    901901    def _setShowCommandWindowMenu(self, val): 
    902902        self._showCommandWindowMenu = bool(val) 
    903  
     903             
    904904 
    905905    def _getShowSizerLinesMenu(self): 
     
    909909            v = self._showSizerLinesMenu = True 
    910910        return v 
    911  
     911             
    912912    def _setShowSizerLinesMenu(self, val): 
    913913        self._showSizerLinesMenu = bool(val) 
    914914 
    915  
     915             
    916916    def _getUI(self): 
    917917        try: 
     
    919919        except AttributeError: 
    920920            return None 
    921  
     921             
    922922    def _setUI(self, uiType): 
    923923        # Load the appropriate ui module. dabo.ui will now contain 
     
    926926            if uiType is None: 
    927927                self._uiAlreadySet = True 
    928                 dabo.logInfo(_("User interface set set to None.")) 
     928                dabo.infoLog.write(_("User interface set set to None.")) 
    929929            elif dabo.ui.loadUI(uiType): 
    930930                self._uiAlreadySet = True 
    931                 dabo.logInfo(_("User interface set to '%s' by dApp.") % uiType) 
     931                dabo.infoLog.write(_("User interface set to '%s' by dApp.") % uiType) 
    932932            else: 
    933                 dabo.logInfo(_("Tried to set UI to '%s', but it failed.") % uiType) 
     933                dabo.infoLog.write(_("Tried to set UI to '%s', but it failed.") % uiType) 
    934934        else: 
    935935            raise RuntimeError, _("The UI cannot be reset once assigned.") 
    936936 
    937  
     937     
    938938    def _getUserSettingProvider(self): 
    939939        try: 
     
    946946                ret = self._userSettingProvider = None 
    947947        return ret 
    948  
     948         
    949949    def _setUserSettingProvider(self, val): 
    950950        self._userSettingProvider = val 
     
    966966            _("Specifies the form class to use for the application's About screen.")) 
    967967 
    968     ActiveForm = property(_getActiveForm, _setActiveForm, None, 
     968    ActiveForm = property(_getActiveForm, _setActiveForm, None,  
    969969            _("Returns the form that currently has focus, or None.  (dForm)" ) ) 
    970  
     970     
    971971    BasePrefKey = property(_getBasePrefKey, _setBasePrefKey, None, 
    972972            _("""Base key used when saving/restoring preferences. This differs 
    973             from the default definition of this property in that if it is empty, it 
     973            from the default definition of this property in that if it is empty, it  
    974974            will return the ActiveForm's BasePrefKey or the MainForm's BasePrefKey 
    975975            in that order. (str)""")) 
    976  
    977     Crypto = property(_getCrypto, _setCrypto, None, 
     976     
     977    Crypto = property(_getCrypto, _setCrypto, None,  
    978978            _("Reference to the object that provides cryptographic services.  (varies)" ) ) 
    979  
     979     
    980980    DatabaseActivityLog = property(_getDatabaseActivityLog, _setDatabaseActivityLog, None, 
    981             _("""Path to the file (or file-like object) to be used for logging all database 
     981            _("""Path to the file (or file-like object) to be used for logging all database  
    982982            activity. Default=None, which means no log is kept.   (file or str)""")) 
    983  
     983     
    984984    DrawSizerOutlines = property(_getDrawSizerOutlines, _setDrawSizerOutlines, None, 
    985985            _("Determines if sizer outlines are drawn on the ActiveForm.  (bool)")) 
    986  
     986     
    987987    Encoding = property(_getEncoding, None, None, 
    988988            _("Name of encoding to use for unicode  (str)") ) 
    989  
     989             
    990990    HomeDirectory = property(_getHomeDirectory, _setHomeDirectory, None, 
    991991            _("""Specifies the application's home directory. (string) 
    992992 
    993993            The HomeDirectory is the top-level directory for your application files, 
    994             the directory where your main script lives. You never know what the 
     994            the directory where your main script lives. You never know what the  
    995995            current directory will be on a given system, but HomeDirectory will always 
    996996            get you to your files.""")) 
    997  
     997         
    998998    Icon = property(_getIcon, _setIcon, None, 
    999999            _("""Specifies the icon to use on all forms and dialogs by default. 
     
    10081008            _("""The object reference to the main form of the application, or None. 
    10091009 
    1010             The MainForm gets instantiated automatically during application setup, 
     1010            The MainForm gets instantiated automatically during application setup,  
    10111011            based on the value of MainFormClass. If you want to swap in your own 
    10121012            MainForm instance, do it after setup() but before start(), as in: 
     
    10171017            >>> app.MainForm = myMainFormInstance 
    10181018            >>> app.start()""")) 
    1019  
     1019         
    10201020    MainFormClass = property(_getMainFormClass, _setMainFormClass, None, 
    10211021            _("""Specifies the class to instantiate for the main form. Can be a 
    10221022            class reference, or the path to a .cdxml file. 
    10231023 
    1024             Defaults to the dFormMain base class. Set to None if you don't want a 
     1024            Defaults to the dFormMain base class. Set to None if you don't want a  
    10251025            main form, or set to your own main form class. Do this before calling 
    10261026            dApp.start(), as in: 
     
    10311031            >>> app.start() 
    10321032            (dForm) """)) 
    1033  
    1034     NoneDisplay = property(_getNoneDisp, _setNoneDisp, None, 
     1033     
     1034    NoneDisplay = property(_getNoneDisp, _setNoneDisp, None,  
    10351035            _("Text to display for null (None) values.  (str)") ) 
    1036  
     1036     
    10371037    Platform = property(_getPlatform, None, None, 
    1038             _("""Returns the platform we are running on. This will be 
     1038            _("""Returns the platform we are running on. This will be  
    10391039            one of 'Mac', 'Win' or 'GTK'.  (str)""") ) 
    10401040 
     
    10431043 
    10441044                As the user types, the search string is modified. If the time between 
    1045                 keystrokes exceeds SearchDelay (milliseconds), the search will run and 
     1045                keystrokes exceeds SearchDelay (milliseconds), the search will run and  
    10461046                the search string   will be cleared. 
    10471047 
    10481048                The value set here in the Application object will become the default for 
    10491049                all objects that provide incremental searching application-wide.""") ) 
    1050  
    1051     SecurityManager = property(_getSecurityManager, _setSecurityManager, None, 
    1052             _("""Specifies the Security Manager, if any. 
    1053  
    1054             You must subclass dSecurityManager, overriding the appropriate hooks 
    1055             and properties, and then set dApp.SecurityManager to an instance of your 
    1056             subclass. There is no security manager by default - you explicitly set 
     1050             
     1051    SecurityManager = property(_getSecurityManager, _setSecurityManager, None,  
     1052            _("""Specifies the Security Manager, if any.  
     1053 
     1054            You must subclass dSecurityManager, overriding the appropriate hooks  
     1055            and properties, and then set dApp.SecurityManager to an instance of your  
     1056            subclass. There is no security manager by default - you explicitly set  
    10571057            this to use Dabo security.""") ) 
    10581058 
    10591059    ShowCommandWindowMenu = property(_getShowCommandWindowMenu, 
    1060             _setShowCommandWindowMenu, None, 
     1060            _setShowCommandWindowMenu, None,  
    10611061            _("""Specifies whether the command window option is shown in the menu. 
    10621062 
    10631063            If True (the default), there will be a File|Command Window option 
    1064             available in the base menu. If False, your code can still start the 
     1064            available in the base menu. If False, your code can still start the  
    10651065            command window by calling app.showCommandWindow() directly.""") ) 
    10661066 
    10671067    ShowSizerLinesMenu = property(_getShowSizerLinesMenu, 
    1068             _setShowSizerLinesMenu, None, 
     1068            _setShowSizerLinesMenu, None,  
    10691069            _("""Specifies whether the "Show Sizer Lines" option is shown in the menu. 
    10701070 
     
    10721072            available in the base menu.""") ) 
    10731073 
    1074     UI = property(_getUI, _setUI, None, 
     1074    UI = property(_getUI, _setUI, None,  
    10751075            _("""Specifies the user interface to load, or None. (str) 
    10761076 
     
    10781078            'wx' is the only supported user interface library at this point.""")) 
    10791079 
    1080     UserSettingProvider = property(_getUserSettingProvider, 
     1080    UserSettingProvider = property(_getUserSettingProvider,  
    10811081            _setUserSettingProvider, None, 
    10821082            _("""Specifies the reference to the object providing user preference persistence. 
    1083  
     1083             
    10841084            The default UserSettingProvider will save user preferences inside the .dabo 
    10851085            directory inside the user's home directory.""")) 
     
    10881088            _setUserSettingProviderClass, None, 
    10891089            _("""Specifies the class to use for user preference persistence. 
    1090  
     1090             
    10911091            The default UserSettingProviderClass will save user preferences inside the .dabo 
    10921092            directory inside the user's home directory, and will be instantiated by Dabo 
  • trunk/dabo/dEvents.py

    r3194 r3199  
    99class dEvent(dObject): 
    1010    """ Base class for Dabo events. 
    11  
    12     Event objects are instantiated in self.raiseEvent(), and passed to all 
     11     
     12    Event objects are instantiated in self.raiseEvent(), and passed to all  
    1313    callbacks registered with self.bindEvent(). 
    14  
    15     User code can define custom events by simply subclassing Event and then 
     14     
     15    User code can define custom events by simply subclassing Event and then  
    1616    using self.bindEvent() and self.raiseEvent() in your objects. 
    17     """ 
     17    """         
    1818&n