dabo Commit
Revision 6063
Date: 2010-10-03 10:03:38 -0700 (Sun, 03 Oct 2010)
Author: Ed
Trac: http://trac.dabodev.com/changeset/6063

Changed:
U   trunk/ide/ReportDesigner.py

Log:
Removed the has_key() calls.


Diff:
Modified: trunk/ide/ReportDesigner.py
===================================================================
--- trunk/ide/ReportDesigner.py 2010-10-03 17:01:01 UTC (rev 6062)
+++ trunk/ide/ReportDesigner.py 2010-10-03 17:03:38 UTC (rev 6063)
@@ -63,9 +63,9 @@
                                return False
 
                        def isRecord(name):
-                               if name and 
rdc.ReportForm.has_key("TestCursor") \
-                                               and 
len(rdc.ReportForm["TestCursor"]) > 0 \
-                                               and 
rdc.ReportForm["TestCursor"][0].has_key(name):
+                               if (name and ("TestCursor" in rdc.ReportForm)
+                                               and rdc.ReportForm["TestCursor"]
+                                               and (typ in parent)):
                                        return True
                                return False
 
@@ -530,7 +530,7 @@
                                removeNode = False
                                if isinstance(parent, dict):
                                        for typ in ("Objects", "Variables", 
"Groups"):
-                                               if parent.has_key(typ):
+                                               if typ in parent:
                                                        if obj in parent[typ]:
                                                                
parent[typ].remove(obj)
                                                                removeNode = 
True
@@ -819,7 +819,7 @@
                        for child in frm.get("Objects", []):
                                self.recurseLayout(frm=child, parentNode=node)
                        for band in ("GroupHeader", "GroupFooter"):
-                               if frm.has_key(band):
+                               if band in frm:
                                        self.recurseLayout(frm=frm[band], 
parentNode=node)
 
                elif frm.__class__.__name__ in ("Variables", "Groups", 
"TestCursor"):
@@ -1586,7 +1586,7 @@
                dc.SetBrush(wx.Brush((0,0,0), wx.TRANSPARENT))
 
                # Draw a border around the object, if appropriate:
-               if obj.has_key("BorderWidth"):
+               if "BorderWidth" in obj:
                        borderWidth = 
self._rw.getPt(obj.getProp("BorderWidth")) * self.Parent.Zoom
                        if borderWidth > 0:
                                borderColor = 
self._rw.getColorTupleFromReportLab(obj.getProp("BorderColor"))
@@ -1748,7 +1748,7 @@
                                392: "+"}
 
                keyCode = evt.EventData["keyCode"]
-               if not keys.has_key(keyCode):
+               if not keyCode in keys:
                        return
 
                # Okay, we have valid item(s) selected, and it is a key we are 
interested in.



_______________________________________________
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