dabo Commit
Revision 5673
Date: 2010-02-11 15:22:24 -0800 (Thu, 11 Feb 2010)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5673

Changed:
U   trunk/dabo/ui/uiwx/dForm.py

Log:
Added the convenience of returning the passed bizobj instance to the caller 
of dForm.addBizobj(), allowing the caller to get the reference and add the
bizobj in one call instead of two.


Diff:
Modified: trunk/dabo/ui/uiwx/dForm.py
===================================================================
--- trunk/dabo/ui/uiwx/dForm.py 2010-02-10 02:16:56 UTC (rev 5672)
+++ trunk/dabo/ui/uiwx/dForm.py 2010-02-11 23:22:24 UTC (rev 5673)
@@ -198,12 +198,13 @@
                """ Add a bizobj to this form.
 
                Make the bizobj the form's primary bizobj if it is the first 
bizobj to 
-               be added.
+               be added. For convenience, return the bizobj to the caller
                """
                self.bizobjs[bizobj.DataSource] = bizobj
                if len(self.bizobjs) == 1:
                        self.PrimaryBizobj = bizobj
                self.setStatusText("Bizobj '%s' %s." % (bizobj.DataSource, 
_("added")))
+               return bizobj
 
 
        def afterSetPrimaryBizobj(self):



_______________________________________________
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