dabo Commit
Revision 6993
Date: 2011-11-29 14:20:07 -0800 (Tue, 29 Nov 2011)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6993
Changed:
U trunk/dabo/ui/uiwx/dShell.py
Log:
Make 'bo' refer to the primary bizobj of the form that 'self' refers to, for
convenience.
To think, all these years when I fired up a dShell from my running app,
I've been doing the following first thing:
bo = self.getBizobj()
I finally got lazy.
Diff:
Modified: trunk/dabo/ui/uiwx/dShell.py
===================================================================
--- trunk/dabo/ui/uiwx/dShell.py 2011-11-29 22:15:03 UTC (rev 6992)
+++ trunk/dabo/ui/uiwx/dShell.py 2011-11-29 22:20:07 UTC (rev 6993)
@@ -474,10 +474,14 @@
self.SplitState = True
# Make 'self' refer to the calling form, or this form if no
calling form.
+ # Make 'bo' refer to the primary bizobj of the calling form, if
any.
if self.Parent is None:
ns = self
else:
ns = self.Parent
+ bo = getattr(ns, "PrimaryBizobj", None)
+ if bo:
+ self.shell.interp.locals['bo'] = bo
self.shell.interp.locals['self'] = ns
self.Caption = _("dShellForm: self is %s") % ns.Name
_______________________________________________
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]