dabo Commit
Revision 4828
Date: 2008-12-11 19:12:54 -0800 (Thu, 11 Dec 2008)
Author: Ed
Trac: http://trac.dabodev.com/dabo/changeset/4828
Changed:
U trunk/dabo/ui/dDataControlMixinBase.py
Log:
Fixed an issue where a table with a column with the same name as a bizobj
property (such as 'Name') would throw an error.
Diff:
Modified: trunk/dabo/ui/dDataControlMixinBase.py
===================================================================
--- trunk/dabo/ui/dDataControlMixinBase.py 2008-12-12 02:02:01 UTC (rev
4827)
+++ trunk/dabo/ui/dDataControlMixinBase.py 2008-12-12 03:12:54 UTC (rev
4828)
@@ -106,7 +106,7 @@
if src and self._srcIsBizobj:
# First see if DataField refers to a method of the
bizobj:
method = getattr(src, self.DataField, None)
- if method is not None:
+ if callable(method):
self.Value = method()
else:
try:
@@ -123,15 +123,13 @@
if src is None:
# Could be testing
return
-
try:
srcatt = getattr(src, self.DataField)
except AttributeError:
# This happens in design tools, where a control
might bind to a property
# that the current object doesn't have.
return
-
-
+
if self._srcIsInstanceMethod:
try:
self.Value = srcatt()
_______________________________________________
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]