dabo Commit
Revision 6471
Date: 2011-02-25 00:29:43 -0800 (Fri, 25 Feb 2011)
Author: Werner
Trac: http://trac.dabodev.com/changeset/6471

Changed:
U   trunk/dabo/biz/dAutoBizobj.py
U   trunk/dabo/db/dTable.py
U   trunk/dabo/lib/autosuper/autosuper.py
U   trunk/dabo/lib/datanav/Bizobj.py
U   trunk/dabo/lib/profilehooks.py
U   trunk/dabo/lib/utils.py
U   trunk/dabo/lib/uuid.py
U   trunk/dabo/ui/__init__.py
U   trunk/dabo/ui/dControlMixinBase.py
U   trunk/dabo/ui/dDataControlMixinBase.py
U   trunk/dabo/ui/dPemMixinBase.py
U   trunk/dabo/ui/dialogs/PreferenceDialog.py
U   trunk/dabo/ui/dialogs/Wizard.py
U   trunk/dabo/ui/dialogs/WizardPage.py
U   trunk/dabo/ui/uiwx/__init__.py
U   trunk/dabo/ui/uiwx/dBaseMenuBar.py
U   trunk/dabo/ui/uiwx/dBitmapButton.py
U   trunk/dabo/ui/uiwx/dBorderSizer.py
U   trunk/dabo/ui/uiwx/dBorderlessButton.py
U   trunk/dabo/ui/uiwx/dBox.py
U   trunk/dabo/ui/uiwx/dButton.py
U   trunk/dabo/ui/uiwx/dCalendar.py
U   trunk/dabo/ui/uiwx/dCheckList.py
U   trunk/dabo/ui/uiwx/dComboBox.py
U   trunk/dabo/ui/uiwx/dControlItemMixin.py
U   trunk/dabo/ui/uiwx/dDataControlMixin.py
U   trunk/dabo/ui/uiwx/dDateTextBox.py
U   trunk/dabo/ui/uiwx/dDialog.py
U   trunk/dabo/ui/uiwx/dDockForm.py
U   trunk/dabo/ui/uiwx/dDropdownList.py
U   trunk/dabo/ui/uiwx/dEditBox.py
U   trunk/dabo/ui/uiwx/dEditableList.py
U   trunk/dabo/ui/uiwx/dEditor.py
U   trunk/dabo/ui/uiwx/dForm.py
U   trunk/dabo/ui/uiwx/dFormMain.py
U   trunk/dabo/ui/uiwx/dFormMixin.py
U   trunk/dabo/ui/uiwx/dGlWindow.py
U   trunk/dabo/ui/uiwx/dGrid.py
U   trunk/dabo/ui/uiwx/dGridSizer.py
U   trunk/dabo/ui/uiwx/dHtmlBox.py
U   trunk/dabo/ui/uiwx/dHyperLink.py
U   trunk/dabo/ui/uiwx/dIcons.py
U   trunk/dabo/ui/uiwx/dImage.py
U   trunk/dabo/ui/uiwx/dKeys.py
U   trunk/dabo/ui/uiwx/dLabel.py
U   trunk/dabo/ui/uiwx/dLine.py
U   trunk/dabo/ui/uiwx/dLinePlot.py
U   trunk/dabo/ui/uiwx/dListControl.py
U   trunk/dabo/ui/uiwx/dMaskedTextBox.py
U   trunk/dabo/ui/uiwx/dMediaControl.py
U   trunk/dabo/ui/uiwx/dMenu.py
U   trunk/dabo/ui/uiwx/dMenuBar.py
U   trunk/dabo/ui/uiwx/dMessageBox.py
U   trunk/dabo/ui/uiwx/dPage.py
U   trunk/dabo/ui/uiwx/dPageFrame.py
U   trunk/dabo/ui/uiwx/dPageFrameMixin.py
U   trunk/dabo/ui/uiwx/dPageFrameNoTabs.py
U   trunk/dabo/ui/uiwx/dPanel.py
U   trunk/dabo/ui/uiwx/dPdfWindow.py
U   trunk/dabo/ui/uiwx/dPemMixin.py
U   trunk/dabo/ui/uiwx/dProgressDialog.py
U   trunk/dabo/ui/uiwx/dRadioList.py
U   trunk/dabo/ui/uiwx/dRichTextBox.py
U   trunk/dabo/ui/uiwx/dShell.py
U   trunk/dabo/ui/uiwx/dSizerMixin.py
U   trunk/dabo/ui/uiwx/dSlidePanelControl.py
U   trunk/dabo/ui/uiwx/dSlider.py
U   trunk/dabo/ui/uiwx/dSpinner.py
U   trunk/dabo/ui/uiwx/dSplitter.py
U   trunk/dabo/ui/uiwx/dStatusBar.py
U   trunk/dabo/ui/uiwx/dTextBoxMixin.py
U   trunk/dabo/ui/uiwx/dToggleButton.py
U   trunk/dabo/ui/uiwx/dToolBar.py
U   trunk/dabo/ui/uiwx/dTreeView.py
U   trunk/dabo/ui/uiwx/gridRenderers.py
U   trunk/dabo/ui/uiwx/test.py
U   trunk/dabo/ui/uiwx/uiApp.py

Log:
- another batch of documentation string changes for Sphinx doc

Diff:
Modified: trunk/dabo/biz/dAutoBizobj.py
===================================================================
--- trunk/dabo/biz/dAutoBizobj.py       2011-02-24 23:58:01 UTC (rev 6470)
+++ trunk/dabo/biz/dAutoBizobj.py       2011-02-25 08:29:43 UTC (rev 6471)
@@ -20,7 +20,8 @@
 
 
 def setupAutoBiz(conn, autoBizes):
-       """This function sets up a list of dAutoBizobj's for auto creation.
+       """
+       This function sets up a list of dAutoBizobj's for auto creation.
        Instead of doing this::
 
                t = myBiz1(conn)
@@ -38,7 +39,8 @@
 
 
 def autoCreateTables(noAccessDialog=None):
-       """This function creates tables if they don't exist.
+       """
+       This function creates tables if they don't exist.
        Tables are added to the list of tables for auto creation when the Table
        property is set for a dAutoBizobj.
        """

Modified: trunk/dabo/db/dTable.py
===================================================================
--- trunk/dabo/db/dTable.py     2011-02-24 23:58:01 UTC (rev 6470)
+++ trunk/dabo/db/dTable.py     2011-02-25 08:29:43 UTC (rev 6471)
@@ -10,34 +10,32 @@
        be created on any database.
 
        For example:
+               
                To define a temporary table named 'mytemp' that has ? fields,
                where the fields are:
-                       
-                       field 1: 'theid', it is an autoincrementing field that 
uses a 2 byte integer
-                       field 2: 'first_name', it is a string field that has a 
max of 25
-                                    characters, part of an indexes 'idx_first' 
and 'idx_name'
-                       field 3: 'last_name', it is a string field that has a 
max of 25
-                                    characters, NULL's are not allowed, part 
of an indexes
-                                    'idx_last' and 'idx_name'
-                       field 4: 'amount_owes', it is a float that has a total 
of 8 decimal places,
-                                    2 of the decimal places are to the right 
of the point, uses 8 bytes,
-                                    and the default is 0
 
-               Code Example::
+                       ============= ======================
+                       field 1:      'theid', it is an autoincrementing field 
that uses a 2 byte integer
+                       field 2:      'first_name', it is a string field that 
has a max of 25 characters, part of an indexes 'idx_first' and 'idx_name'
+                       field 3:      'last_name', it is a string field that 
has a max of 25 characters, NULL's are not allowed, part of an indexes 
'idx_last' and 'idx_name'
+                       field 4:      'amount_owes', it is a float that has a 
total of 8 decimal places, 2 of the decimal places are to the right of the 
point, uses 8 bytes, and the default is 0
+                       ============= ======================
+
+       Code Example::
+               
+               from dabo.db import dTable
+               myTable = dTable(Name="mytemp", IsTemp=True)
+               myTable.addField(Name="theid", IsPK=True, DataType="int",
+                               Size=2, IsAutoIncrement=True)
+               myTable.addField(Name="first_name", DataType="string", Size=25,
+                               Index="idx_first")
+               myTable.addField(Name="last_name", DataType="string", Size=25,
+                               AllowNulls=False, Index="idx_last")
+               myTable.addField(Name="amount_owes", DataType="float",
+                               TotalDP=8, RightDP=2, Size=8, Default=0)
+               # When you want to have more than one field in an index, use 
addIndex().
+               myTable.addIndex(Name="idx_name", 
Fields=("last_name","first_name"))
                        
-                       from dabo.db import dTable
-                       myTable = dTable(Name="mytemp", IsTemp=True)
-                       myTable.addField(Name="theid", IsPK=True, 
DataType="int",
-                                       Size=2, IsAutoIncrement=True)
-                       myTable.addField(Name="first_name", DataType="string", 
Size=25,
-                                       Index="idx_first")
-                       myTable.addField(Name="last_name", DataType="string", 
Size=25,
-                                       AllowNulls=False, Index="idx_last")
-                       myTable.addField(Name="amount_owes", DataType="float",
-                                       TotalDP=8, RightDP=2, Size=8, Default=0)
-                       # When you want to have more than one field in an 
index, use addIndex().
-                       myTable.addIndex(Name="idx_name", 
Fields=("last_name","first_name"))
-                       
        """
        def __init__(self, *args, **kwargs):
                self._baseClass = dTable

Modified: trunk/dabo/lib/autosuper/autosuper.py
===================================================================
--- trunk/dabo/lib/autosuper/autosuper.py       2011-02-24 23:58:01 UTC (rev 
6470)
+++ trunk/dabo/lib/autosuper/autosuper.py       2011-02-25 08:29:43 UTC (rev 
6471)
@@ -2,7 +2,8 @@
 # Improved version of Python Cookbook recipe
 # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286195
 
-"""Automatically determine the correct super object and use it.
+"""
+Automatically determine the correct super object and use it.
 
 This module defines a mix-in class `autosuper` which has a single property -
 `super`.
@@ -63,7 +64,8 @@
 
 **Note:** For performance reasons, this implementation modifies the bytecode of
 functions. To disable bytecode modification, set `__super_modify_bytecode__` to
-`False`."""
+`False`.
+"""
 
 from __future__ import generators
 

Modified: trunk/dabo/lib/datanav/Bizobj.py
===================================================================
--- trunk/dabo/lib/datanav/Bizobj.py    2011-02-24 23:58:01 UTC (rev 6470)
+++ trunk/dabo/lib/datanav/Bizobj.py    2011-02-25 08:29:43 UTC (rev 6471)
@@ -51,11 +51,13 @@
 
                        If you have the following base sql:
 
-                               select invoice.number as invoicenumber,
-                                      customer.name as name
-                                 from invoice
-                                inner join customer
-                                   on customer.id = invoice.custid
+                       .. code-block:: sql
+                       
+                          select invoice.number as invoicenumber,
+                                         customer.name as name
+                                       from invoice
+                                               inner join customer
+                                               on customer.id = invoice.custid
 
                        The where clause as generated using fieldSpecs will 
incorrectly
                        do "WHERE invoice.invoicenumber = " or "WHERE 
invoice.name = "
@@ -73,7 +75,7 @@
 
                                self.addField("invoice.number as invoicenumber")
                                self.addField("customer.name as name")
-                               
+
                        """))
 
        BaseWhereClause = property(getBaseWhereClause, _setBaseWhereClause, 
None,

Modified: trunk/dabo/lib/profilehooks.py
===================================================================
--- trunk/dabo/lib/profilehooks.py      2011-02-24 23:58:01 UTC (rev 6470)
+++ trunk/dabo/lib/profilehooks.py      2011-02-25 08:29:43 UTC (rev 6471)
@@ -48,11 +48,11 @@
   support nested profiling (currently TraceFuncCoverage is the only one that
   supports this, while HotShotFuncProfile has support for recursive functions.)
 
-  Profiling with hotshot creates temporary files (*.prof and *.prof.pickle for
-  profiling, *.cprof for coverage) in the current directory.  These files are
-  not cleaned up.  (In fact, the *.pickle versions are intentionally written
+  Profiling with hotshot creates temporary files (\*.prof and \*.prof.pickle 
for
+  profiling, \*.cprof for coverage) in the current directory.  These files are
+  not cleaned up.  (In fact, the \*.pickle versions are intentionally written
   out in case you want to look at the profiler results without having to parse
-  the big *.prof file with hotshot.stats.load, which takes ages.  Just unpickle
+  the big \*.prof file with hotshot.stats.load, which takes ages.  Just 
unpickle
   the file and you'll get a pstats object.)
 
   Coverage analysis with hotshot seems to miss some executions resulting in
@@ -133,20 +133,20 @@
     If `filename` is specified, the profile stats will be pickled and stored in
     a file.
 
-    Usage:
+    Usage::
 
         def fn(...):
             ...
         fn = profile(fn, skip=1)
 
     If you are using Python 2.4, you should be able to use the decorator
-    syntax:
+    syntax::
 
         @profile(skip=3)
         def fn(...):
             ...
 
-    or just
+    or just::
 
         @profile
         def fn(...):
@@ -175,14 +175,14 @@
 
     Results will be printed to sys.stdout on program termination.
 
-    Usage:
+    Usage::
 
         def fn(...):
             ...
         fn = coverage(fn)
 
     If you are using Python 2.4, you should be able to use the decorator
-    syntax:
+    syntax::
 
         @coverage
         def fn(...):
@@ -586,7 +586,7 @@
     """
     Wrap `fn` and print its execution time.
 
-    Example:
+    Example::
 
         @timecall
         def somefunc(x, y):

Modified: trunk/dabo/lib/utils.py
===================================================================
--- trunk/dabo/lib/utils.py     2011-02-24 23:58:01 UTC (rev 6470)
+++ trunk/dabo/lib/utils.py     2011-02-25 08:29:43 UTC (rev 6471)
@@ -81,7 +81,7 @@
        """
        Return the directory where Dabo can save user preference and setting 
information.
 
-       On *nix, this will be something like /home/pmcnett/.dabo
+       On \*nix, this will be something like /home/pmcnett/.dabo
        On Windows, it will be more like c:\Documents and 
Settings\pmcnett\Application Data\Dabo
 
        This function relies on platform conventions to determine this 
information. If it
@@ -128,7 +128,7 @@
 def dictStringify(dct):
        """
        The ability to pass a properties dict to an object relies on
-       the practice of passing '**properties' to a function. Seems that
+       the practice of passing '\*\*properties' to a function. Seems that
        Python requires that the keys in any dict being expanded like
        this be strings, not unicode. This method returns a dict with all
        unicode keys changed to strings.

Modified: trunk/dabo/lib/uuid.py
===================================================================
--- trunk/dabo/lib/uuid.py      2011-02-24 23:58:01 UTC (rev 6470)
+++ trunk/dabo/lib/uuid.py      2011-02-25 08:29:43 UTC (rev 6471)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-"""
+r"""
 UUID objects (universally unique identifiers) according to RFC 4122.
 
 This module provides immutable UUID objects (class UUID) and the functions
@@ -10,39 +10,39 @@
 Note that uuid1() may compromise privacy since it creates a UUID containing
 the computer's network address.  uuid4() creates a random UUID.
 
-Typical usage:
+Typical usage::
 
-    >>> import uuid
+    import uuid
 
     # make a UUID based on the host ID and current time
-    >>> uuid.uuid1()
+    uuid.uuid1()
     UUID('a8098c1a-f86e-11da-bd1a-00112444be1e')
 
     # make a UUID using an MD5 hash of a namespace UUID and a name
-    >>> uuid.uuid3(uuid.NAMESPACE_DNS, 'python.org')
+    uuid.uuid3(uuid.NAMESPACE_DNS, 'python.org')
     UUID('6fa459ea-ee8a-3ca4-894e-db77e160355e')
 
     # make a random UUID
-    >>> uuid.uuid4()
+    uuid.uuid4()
     UUID('16fd2706-8baf-433b-82eb-8c7fada847da')
 
     # make a UUID using a SHA-1 hash of a namespace UUID and a name
-    >>> uuid.uuid5(uuid.NAMESPACE_DNS, 'python.org')
+    uuid.uuid5(uuid.NAMESPACE_DNS, 'python.org')
     UUID('886313e1-3b8a-5372-9b90-0c9aee199e5d')
 
     # make a UUID from a string of hex digits (braces and hyphens ignored)
-    >>> x = uuid.UUID('{00010203-0405-0607-0809-0a0b0c0d0e0f}')
+    x = uuid.UUID('{00010203-0405-0607-0809-0a0b0c0d0e0f}')
 
     # convert a UUID to a string of hex digits in standard form
-    >>> str(x)
+    str(x)
     '00010203-0405-0607-0809-0a0b0c0d0e0f'
 
     # get the raw 16 bytes of the UUID
-    >>> x.bytes
+    x.bytes
     '\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f'
 
     # make a UUID from a 16-byte string
-    >>> uuid.UUID(bytes=x.bytes)
+    uuid.UUID(bytes=x.bytes)
     UUID('00010203-0405-0607-0809-0a0b0c0d0e0f')
 
 This module works with Python 2.3 or higher.
@@ -71,38 +71,45 @@
 
     UUIDs have these read-only attributes:
 
-        bytes       the UUID as a 16-byte string
+       
+----------+------------------------------------------------------------------+
+       |bytes     |the UUID as a 16-byte string                                
      |
+       
+----------+------------------------------------------------------------------+
+       |fields    |a tuple of the six integer fields of the UUID, which are 
also     |
+       |          |available as six individual attributes and two derived 
attributes:|
+       
+----------+-----------------------+------------------------------------------+
+       |          |time_low               |the first 32 bits of the UUID       
      |
+       
+----------+-----------------------+------------------------------------------+
+       |          |time_mid               |the next 16 bits of the UUID        
      |
+       
+----------+-----------------------+------------------------------------------+
+       |          |time_hi_version        |the next 16 bits of the UUID        
      |
+       
+----------+-----------------------+------------------------------------------+
+       |          |clock_seq_hi_variant   |the next 8 bits of the UUID         
      |
+       
+----------+-----------------------+------------------------------------------+
+       |          |clock_seq_low          |the next 8 bits of the UUID         
      |
+       
+----------+-----------------------+------------------------------------------+
+       |          |node                   |the last 48 bits of the UUID        
      |
+       
+----------+-----------------------+------------------------------------------+
+       |          |time                   |the 60-bit timestamp                
      |
+       
+----------+-----------------------+------------------------------------------+
+       |          |clock_seq              |the 14-bit sequence number          
      |
+       
+----------+-----------------------+------------------------------------------+
+       |hex       |the UUID as a 32-character hexadecimal string               
      |
+       
+----------+------------------------------------------------------------------+
+       |int       |the UUID as a 128-bit integer                               
      |
+       
+----------+------------------------------------------------------------------+
+       |urn       |the UUID as a URN as specified in RFC 4122                  
      |
+       
+----------+------------------------------------------------------------------+
+       |variant   |the UUID variant (one of the constants RESERVED_NCS, 
RFC_4122,    |
+       |          |RESERVED_MICROSOFT, or RESERVED_FUTURE)                     
      |
+       
+----------+------------------------------------------------------------------+
+       |version   |the UUID version number (1 through 5, meaningful only when 
the    |
+       |          |variant is RFC_4122)                                        
      |
+       
+----------+------------------------------------------------------------------+
 
-        fields      a tuple of the six integer fields of the UUID,
-                    which are also available as six individual attributes
-                    and two derived attributes:
-
-            time_low                the first 32 bits of the UUID
-            time_mid                the next 16 bits of the UUID
-            time_hi_version         the next 16 bits of the UUID
-            clock_seq_hi_variant    the next 8 bits of the UUID
-            clock_seq_low           the next 8 bits of the UUID
-            node                    the last 48 bits of the UUID
-
-            time                    the 60-bit timestamp
-            clock_seq               the 14-bit sequence number
-
-        hex         the UUID as a 32-character hexadecimal string
-
-        int         the UUID as a 128-bit integer
-
-        urn         the UUID as a URN as specified in RFC 4122
-
-        variant     the UUID variant (one of the constants RESERVED_NCS,
-                    RFC_4122, RESERVED_MICROSOFT, or RESERVED_FUTURE)
-
-        version     the UUID version number (1 through 5, meaningful only
-                    when the variant is RFC_4122)
     """
 
-    def __init__(self, hex=None, bytes=None, fields=None, int=None,
-                       version=None):
-        """
+    def __init__(self, hex=None, bytes=None, fields=None, int=None, 
version=None):
+        r"""
         Create a UUID from either a string of 32 hexadecimal digits,
         a string of 16 bytes as the 'bytes' argument, a tuple of six
         integers (32-bit time_low, 16-bit time_mid, 16-bit time_hi_version,
@@ -112,12 +119,12 @@
         hyphens, and a URN prefix are all optional.  For example, these
         expressions all yield the same UUID:
 
-        UUID('{12345678-1234-5678-1234-567812345678}')
-        UUID('12345678123456781234567812345678')
-        UUID('urn:uuid:12345678-1234-5678-1234-567812345678')
-        UUID(bytes='\x12\x34\x56\x78'*4)
-        UUID(fields=(0x12345678, 0x1234, 0x5678, 0x12, 0x34, 0x567812345678))
-        UUID(int=0x12345678123456781234567812345678)
+        | UUID('{12345678-1234-5678-1234-567812345678}')
+        | UUID('12345678123456781234567812345678')
+        | UUID('urn:uuid:12345678-1234-5678-1234-567812345678')
+        | UUID(bytes='\x12\x34\x56\x78'\*4)
+        | UUID(fields=(0x12345678, 0x1234, 0x5678, 0x12, 0x34, 0x567812345678))
+        | UUID(int=0x12345678123456781234567812345678)
 
         Exactly one of 'hex', 'bytes', 'fields', or 'int' must be given.
         The 'version' argument is optional; if given, the resulting UUID

Modified: trunk/dabo/ui/__init__.py
===================================================================
--- trunk/dabo/ui/__init__.py   2011-02-24 23:58:01 UTC (rev 6470)
+++ trunk/dabo/ui/__init__.py   2011-02-25 08:29:43 UTC (rev 6471)
@@ -1,12 +1,13 @@
 # -*- coding: utf-8 -*-
-""" This is Dabo's user interface layer which is the topmost layer.
+"""
+This is Dabo's user interface layer which is the topmost layer.
 
 There are submodules for all supported UI libraries. As of this writing,
 the only supported UI library is wxPython (uiwx).
 
 To use a given submodule at runtime, you need to call loadUI() with the
 ui module you want as a parameter. For instance, to load wxPython, you
-would issue:
+would issue::
 
        import dabo.ui
        dabo.ui.loadUI("wx")
@@ -20,7 +21,7 @@
 
 
 def getUIType():
-       """ Return the identifier of the currently loaded UI, or None."""
+       """Return the identifier of the currently loaded UI, or None."""
        try:
                return uiType["shortName"]
        except (AttributeError, NameError, KeyError):
@@ -28,7 +29,8 @@
 
 
 def deadCheck(fn, *args, **kwargs):
-       """This decorator is intended to detect dead objects (objects in the 
process of being
+       """
+       This decorator is intended to detect dead objects (objects in the 
process of being
        destroyed) from attempts to call their methods. Currently this only 
supports wxPython,
        but if needed in other toolkits, different functionality will need to 
be coded.
        """
@@ -42,7 +44,7 @@
 
 
 def loadUI(uiType):
-       """ Load the given UI into the global namespace."""
+       """Load the given UI into the global namespace."""
        retVal = False
        currType = getUIType()
        mods = {"wx" : "dabo.ui.uiwx", "tk" : "dabo.ui.uitk"}
@@ -73,7 +75,8 @@
 
 
 def getEventData(uiEvent):
-       """ Given a UI-specific event object, return a UI-agnostic name/value 
dictionary.
+       """
+       Given a UI-specific event object, return a UI-agnostic name/value 
dictionary.
 
        This function must be overridden in each ui library's __init__.py to 
function
        correctly.
@@ -82,13 +85,15 @@
 
 
 def makeDynamicProperty(prop, additionalDoc=None):
-       """Make a Dynamic property for the passed property.
+       """
+       Make a Dynamic property for the passed property.
 
        Call this in your class definition, after you've defined the property
-       you'd like to make dynamic. For example:
+       you'd like to make dynamic. For example:"
 
        Caption = property(_getCaption, _setCaption, None, None)
        DynamicCaption = makeDynamicProperty(Caption)
+       
        """
        propName = None
        frame = inspect.currentframe(1)
@@ -126,7 +131,8 @@
 
 
 def makeProxyProperty(dct, nm, proxyAtts):
-       """When creating composite controls, it is necessary to be able to pass 
through
+       """
+       When creating composite controls, it is necessary to be able to pass 
through
        property get/set calls to an object or objects within the composite 
control. For
        example, if a class based on dPanel contains a textbox and a label, I 
might want
        to proxy the class's Caption to the label's Caption, the Value to the 
textbox, and
@@ -137,7 +143,7 @@
        would be a property like 'Height': the outer panel needs to grow as 
well as the
        inner controls. In this case, assuming you store a reference to the 
textbox and
        label in attributes named '_textbox' and '_label', respectively, the 
code in your
-       custom composite class would look like:
+       custom composite class would look like::
 
                _proxyDict = {}
                Caption = makeProxyProperty(_proxyDict, "Caption", "_label")

Modified: trunk/dabo/ui/dControlMixinBase.py
===================================================================
--- trunk/dabo/ui/dControlMixinBase.py  2011-02-24 23:58:01 UTC (rev 6470)
+++ trunk/dabo/ui/dControlMixinBase.py  2011-02-25 08:29:43 UTC (rev 6471)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-""" dControlMixin.py: Provide behavior common to all dControls """
+"""Provide behavior common to all dControls"""
 
 import dabo
 import dabo.ui
@@ -7,8 +7,7 @@
 import dabo.dEvents as dEvents
 
 class dControlMixinBase(dabo.ui.dPemMixin):
-       """ Provide common functionality for all controls.
-       """
+       """Provide common functionality for all controls."""
        def _initEvents(self):
                super(dControlMixinBase, self)._initEvents()
 

Modified: trunk/dabo/ui/dDataControlMixinBase.py
===================================================================
--- trunk/dabo/ui/dDataControlMixinBase.py      2011-02-24 23:58:01 UTC (rev 
6470)
+++ trunk/dabo/ui/dDataControlMixinBase.py      2011-02-25 08:29:43 UTC (rev 
6471)
@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
-""" dDataControlMixin.py: Provide behavior common to all
-       data-aware dControls.
-"""
+"""dDataControlMixin.py: Provide behavior common to all        data-aware 
dControls."""
 import dabo, dabo.ui
 import dabo.dEvents as dEvents
 import dabo.dException as dException
@@ -13,7 +11,7 @@
 
 
 class dDataControlMixinBase(dabo.ui.dControlMixin):
-       """ Provide common functionality for the data-aware controls."""
+       """Provide common functionality for the data-aware controls."""
        def __init__(self, *args, **kwargs):
                self._fldValidFailed = False
                self.__src = self._srcIsBizobj = self._srcIsInstanceMethod = 
None
@@ -92,12 +90,12 @@
 
 
        def getBlankValue(self):
-               """ Return the empty value of the control."""
+               """Return the empty value of the control."""
                return None
 
 
        def update(self):
-               """ Update control's value to match the current value from the 
source."""
+               """Update control's value to match the current value from the 
source."""
                # We need to do the data handling stuff before calling super()
                self.__dataUpdate()
                super(dDataControlMixinBase, self).update()
@@ -158,7 +156,8 @@
 
 
        def select(self, position, length):
-               """ Select all text from <position> for <length> or end of 
string.
+               """
+               Select all text from <position> for <length> or end of string.
 
                UI lib must override.
                """
@@ -166,7 +165,8 @@
 
 
        def selectAll(self):
-               """ Select all text in the control.
+               """
+               Select all text in the control.
 
                UI lib must override.
                """
@@ -174,7 +174,8 @@
 
 
        def selectNone(self):
-               """ Select no text in the control.
+               """
+               Select no text in the control.
 
                UI lib must override.
                """
@@ -182,7 +183,8 @@
 
 
        def flushValue(self):
-               """ Save any changes to the underlying source field. First 
check to make sure
+               """
+               Save any changes to the underlying source field. First check to 
make sure
                that any changes are validated.
                """
                # We need to test empty oldvals because of the way that 
textboxes work; they
@@ -274,7 +276,7 @@
 
 
        def saveValue(self):
-               """ Save control's value to dApp's user settings table."""
+               """Save control's value to dApp's user settings table."""
                if self.IsSecret:
                        # Don't store sensitive info
                        return
@@ -291,7 +293,7 @@
 
 
        def restoreValue(self):
-               """ Set the control's value to the value in dApp's user 
settings table."""
+               """Set the control's value to the value in dApp's user settings 
table."""
                if self.Application:
                        if self.RegID:
                                name = "%s.%s" % (self.Form.Name, self.RegID)
@@ -321,9 +323,11 @@
 
 
        def _afterValueChanged(self):
-               """Called after the control's value has changed.
+               """
+               Called after the control's value has changed.
 
                This is defined as one of:
+               
                        + the user changed the value and then the control lost 
focus
                        + the control's Value property was set and the value 
changed
 

Modified: trunk/dabo/ui/dPemMixinBase.py
===================================================================
--- trunk/dabo/ui/dPemMixinBase.py      2011-02-24 23:58:01 UTC (rev 6470)
+++ trunk/dabo/ui/dPemMixinBase.py      2011-02-25 08:29:43 UTC (rev 6471)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-""" dPemMixin.py: Provide common PEM functionality """
+"""dPemMixin.py: Provide common PEM functionality"""
 import dabo
 import types
 from dabo.dObject import dObject
@@ -8,7 +8,8 @@
 
 
 class dPemMixinBase(dObject):
-       """ Provide Property/Event/Method interfaces for dForms and dControls.
+       """
+       Provide Property/Event/Method interfaces for dForms and dControls.
 
        Subclasses can extend the property sheet by defining their own get/set
        functions along with their own property() statements.
@@ -18,18 +19,19 @@
                self.autoBindEvents()
 
        def _initUI(self):
-               """ Abstract method: subclasses MUST override for 
UI-specifics."""
+               """Abstract method: subclasses MUST override for 
UI-specifics."""
                pass
 
 
        def getPropertyInfo(cls, name):
-               """ Abstract method: subclasses MUST override for 
UI-specifics."""
+               """Abstract method: subclasses MUST override for 
UI-specifics."""
                return super(dPemMixinBase, cls).getPropertyInfo(name)
        getPropertyInfo = classmethod(getPropertyInfo)
 
 
        def addObject(self, classRef, name=None, *args, **kwargs):
-               """ Create an instance of classRef, and make it a child of self.
+               """
+               Create an instance of classRef, and make it a child of self.
 
                Abstract method: subclasses MUST override for UI-specifics.
                """
@@ -37,16 +39,16 @@
 
 
        def reCreate(self, child=None):
-               """ Abstract method: subclasses MUST override for 
UI-specifics."""
+               """Abstract method: subclasses MUST override for 
UI-specifics."""
                pass
 
 
        def clone(self, obj, name=None):
-               """ Abstract method: subclasses MUST override for 
UI-specifics."""
+               """Abstract method: subclasses MUST override for 
UI-specifics."""
                pass
 
        def refresh(self):
-               """ Abstract method."""
+               """Abstract method."""
                pass
 
 
@@ -81,7 +83,8 @@
 
 
        def iterateCall(self, funcName, *args, **kwargs):
-               """Call the given function on this object and all of its 
Children. If
+               """
+               Call the given function on this object and all of its Children. 
If
                any object does not have the given function, no error is 
raised; it
                is simply ignored.
                """

Modified: trunk/dabo/ui/dialogs/PreferenceDialog.py
===================================================================
--- trunk/dabo/ui/dialogs/PreferenceDialog.py   2011-02-24 23:58:01 UTC (rev 
6470)
+++ trunk/dabo/ui/dialogs/PreferenceDialog.py   2011-02-25 08:29:43 UTC (rev 
6471)
@@ -40,7 +40,8 @@
 
 
        def addControls(self):
-               """Add the base PageList, and then delete this method from the
+               """
+               Add the base PageList, and then delete this method from the
                namespace. Users will customize with addCategory() and then
                adding controls to the category page.
                """
@@ -81,7 +82,8 @@
 
 
        def _onAcceptPref(self):
-               """This is called by the app when the user clicks the OK 
button. Every method in
+               """
+               This is called by the app when the user clicks the OK button. 
Every method in
                the callOnAccept list is called, followed by a call to the 
user-configurable
                onAccept() method.
                """
@@ -98,7 +100,8 @@
 
 
        def _onCancelPref(self):
-               """This is called by the app when the user clicks the Cancel 
button. Every method
+               """
+               This is called by the app when the user clicks the Cancel 
button. Every method
                in the callOnCancel list is called, followed by a call to the 
user-configurable
                onCancel() method.
                """
@@ -114,7 +117,8 @@
 
 
        def addCategory(self, category, pos=None):
-               """Adds a page to the main PageList control, sets the caption 
to the
+               """
+               Adds a page to the main PageList control, sets the caption to 
the
                passed string, and returns a reference to the page. If the 
optional 'pos'
                parameter is passed, the page is inserted in that position; 
otherwise, it
                is appended after any existing pages.
@@ -125,7 +129,8 @@
 
 
        def _addDefaultPages(self):
-               """Called when no other code exists to fill the dialog, or when
+               """
+               Called when no other code exists to fill the dialog, or when
                the class's IncludeDefaultPages property is True.
                """
                af = self.Application.ActiveForm
@@ -177,7 +182,7 @@
 
 
        def _recurseMenu(self, mn, nd, pref):
-               """ mn is the menu; nd is the tree node for that menu; pref is 
the pref key for the menu."""
+               """mn is the menu; nd is the tree node for that menu; pref is 
the pref key for the menu."""
                for itm in mn.Children:
                        native = True
                        try:
@@ -274,7 +279,8 @@
 
 
        def _addFrameworkPages(self):
-               """Called when no other code exists to fill the dialog, or when
+               """
+               Called when no other code exists to fill the dialog, or when
                the class's IncludeFrameworkPages property is True.
                """
                wuPage = self.pgWebUpdate = self.addCategory(_("Web Update"))

Modified: trunk/dabo/ui/dialogs/Wizard.py
===================================================================
--- trunk/dabo/ui/dialogs/Wizard.py     2011-02-24 23:58:01 UTC (rev 6470)
+++ trunk/dabo/ui/dialogs/Wizard.py     2011-02-25 08:29:43 UTC (rev 6471)
@@ -8,7 +8,8 @@
 
 
 class Wizard(dabo.ui.dDialog):
-       """ This is the main form for creating wizards. To use it, define
+       """
+       This is the main form for creating wizards. To use it, define
        a series of wizard pages, based on WizardPage. Then add these
        classes to your subclass of Wizard. The order that you add them
        will be the order that they appear in the wizard.
@@ -55,7 +56,7 @@
 
 
        def setup(self):
-               """ This creates the controls used by the wizard. """
+               """This creates the controls used by the wizard."""
                mp = self.mainPanel
                if self.setPageColor:
                        mp.BackColor = self.BackColor
@@ -143,7 +144,8 @@
 
 
        def finish(self):
-               """This is the place to do any of your cleanup actions. You
+               """
+               This is the place to do any of your cleanup actions. You
                can prevent the wizard from closing by returning False.
                """
                return True
@@ -254,7 +256,8 @@
 
 
        def getRelativePage(self, orig, incr):
-               """ Accepts a page reference and an offset, and returns
+               """
+               Accepts a page reference and an offset, and returns
                the page that is that many places away in the page order.
                If the offset refers to a non-existent page (e.g., on the second
                page and specifying an offset of -4), None will be returned.
@@ -446,7 +449,8 @@
 
 
                def prevPage(self):
-                       """ If the checkbox on the second page is checked,
+                       """
+                       If the checkbox on the second page is checked,
                        we want to skip over page three again. This demonstrates
                        calling to the parent form to get references to other
                        pages.

Modified: trunk/dabo/ui/dialogs/WizardPage.py
===================================================================
--- trunk/dabo/ui/dialogs/WizardPage.py 2011-02-24 23:58:01 UTC (rev 6470)
+++ trunk/dabo/ui/dialogs/WizardPage.py 2011-02-25 08:29:43 UTC (rev 6471)
@@ -46,14 +46,16 @@
 
 
        def createBody(self):
-               """ This is the method to override in subclasses to add any text
+               """
+               This is the method to override in subclasses to add any text
                or other controls for this page.
                """
                pass
 
 
        def makeSizer(self):
-               """ Create a simple sizer. This can be overridden in subclasses
+               """
+               Create a simple sizer. This can be overridden in subclasses
                if specific sizer configurations are needed.
                """
                sz = self.Sizer = dabo.ui.dSizer("v")
@@ -63,7 +65,8 @@
 
 
        def onLeavePage(self, direction):
-               """ This method is called before the wizard changes pages.
+               """
+               This method is called before the wizard changes pages.
                Returning False will prevent the page from changing. Use
                it to make sure that the user has completed all the required
                actions before proceeding to the next step of the wizard.
@@ -74,7 +77,8 @@
 
 
        def onEnterPage(self, direction):
-               """ This method will be called just as the page is about to
+               """
+               This method will be called just as the page is about to
                be made visible. You cannot prevent this from happening,
                as you can with onLeavePage(), but you can use this event
                to do whatever preliminary work that page needs before it
@@ -85,7 +89,8 @@
 
 
        def nextPage(self):
-               """ This method can be overridden in subclasses to provide
+               """
+               This method can be overridden in subclasses to provide
                conditional navigation through the wizard. By default, it 
returns
                the integer 1, meaning move one page forward in the wizards page
                collection. If you wish to skip the next page in order, you can 
simply
@@ -96,7 +101,8 @@
 
 
        def prevPage(self):
-               """ Like nextPage, you can override this method to conditionally
+               """
+               Like nextPage, you can override this method to conditionally
                navigate through the wizard pages. Default = -1
                """
                return -1

Modified: trunk/dabo/ui/uiwx/__init__.py
===================================================================
--- trunk/dabo/ui/uiwx/__init__.py      2011-02-24 23:58:01 UTC (rev 6470)
+++ trunk/dabo/ui/uiwx/__init__.py      2011-02-25 08:29:43 UTC (rev 6471)
@@ -202,16 +202,19 @@
 # Support the old names, but issue deprecation warnings.
 class dFoldPanelBar(dSlidePanelControl):
        def __init__(self, *args, **kwargs):
+               """**Deprecated:** use dSlidePanelControl instead"""
                warnings.warn(_("'dFoldPanelBar' is a deprecated name. Use 
'dSlidePanelControl' instead"), DeprecationWarning)
                super(dFoldPanelBar, self).__init__(*args, **kwargs)
 
 class dFoldPanel(dSlidePanel):
        def __init__(self, *args, **kwargs):
+               """**Deprecated:** use dSlidePanel instead"""
                warnings.warn(_("'dFoldPanel' is a deprecated name. Use 
'dSlidePanel' instead"), DeprecationWarning)
                super(dFoldPanel, self).__init__(*args, **kwargs)
 
 class dCheckListBox(dCheckList):
        def __init__(self, *args, **kwargs):
+               """**Deprecated:** use dCheckList instead"""
                warnings.warn(_("'dCheckListBox' is a deprecated name. Use 
'dCheckList' instead"), DeprecationWarning)
                super(dCheckListBox, self).__init__(*args, **kwargs)
 
@@ -246,7 +249,8 @@
 artConstants["file"] = artConstants.get("normalfile")
 
 def getUiApp(app, uiAppClass=None, callback=None, forceNew=False):
-       """This returns an instance of uiApp. If one is already running, that
+       """
+       This returns an instance of uiApp. If one is already running, that
        instance is returned. Otherwise, a new instance is created.
        """
        if uiAppClass is None:
@@ -265,7 +269,8 @@
 
 
 def callAfter(fnc, *args, **kwargs):
-       """There are times when this functionality is needed when creating UI
+       """
+       There are times when this functionality is needed when creating UI
        code. This function simply wraps the wx.CallAfter function so that
        developers do not need to use wx code in their apps.
        """
@@ -274,7 +279,8 @@
 
 _callAfterIntervalReferences = {}
 def callAfterInterval(interval, func, *args, **kwargs):
-       """Call the given function after <interval> milliseconds have elapsed.
+       """
+       Call the given function after <interval> milliseconds have elapsed.
 
        If the function is called again before the interval has elapsed, the 
original
        timer is destroyed and a new one instantiated. IOW, you can call this 
in a
@@ -295,7 +301,8 @@
 
 
 def setAfter(obj, prop, val):
-       """Like callAfter(), but allows you to set a property instead of calling
+       """
+       Like callAfter(), but allows you to set a property instead of calling
        a function.
        """
        try:
@@ -307,7 +314,8 @@
 
 
 def setAfterInterval(interval, obj, prop, val):
-       """Like callAfterInterval(), but allows you to set a property instead
+       """
+       Like callAfterInterval(), but allows you to set a property instead
        of calling a function.
        """
        try:
@@ -319,7 +327,8 @@
 
 
 def callEvery(interval, func, *args, **kwargs):
-       """Creates and returns a timer object that fires the specified function
+       """
+       Creates and returns a timer object that fires the specified function
        at the specified interval. Interval is given in milliseconds. It will 
pass along
        any additional arguments to the function when it is called.
        """
@@ -349,15 +358,17 @@
 
 
 def busyInfo(msg="Please wait...", *args, **kwargs):
-       """Display a message that the system is busy.
+       """
+       Display a message that the system is busy.
 
        Assign the return value to a local object, and the message will stay 
until the
-       object is explicitly unbound. For example:
+       object is explicitly unbound. For example::
 
-       bi = dabo.ui.busyInfo("Please wait while I count to 10000...")
-       for i in range(10000):
-               pass
-       bi = None
+               bi = dabo.ui.busyInfo("Please wait while I count to 10000...")
+               for i in range(10000):
+                       pass
+               bi = None
+
        """
        bi = wx.BusyInfo(msg, *args, **kwargs)
        try:
@@ -648,7 +659,8 @@
 
 
 def getFormMousePosition():
-       """Returns the position of the mouse relative to the top left
+       """
+       Returns the position of the mouse relative to the top left
        corner of the form.
        """
        actwin = dabo.dAppRef.ActiveForm
@@ -659,7 +671,8 @@
 
 
 def getMouseObject():
-       """Returns a reference to the object below the mouse pointer
+       """

 (217413 bytes were truncated as it was too long for the email (max 40000 
bytes.)

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to