johnf wrote:
> Just opening ReportWriter provides:
>
> Traceback (most recent call last):
[snip]
> File "/home/johnf/downloads/dabo/ide/ClassDesignerPropSheet.py", line 140,
> in select
> self.updatePropGrid(propDict)
> File "/home/johnf/downloads/dabo/ide/ClassDesignerPropSheet.py", line 154,
> in updatePropGrid
> pg.DataSet = ds
> File "/home/johnf/downloads/dabo/dabo/ui/uiwx/dGrid.py", line 3977, in
> _setDataSet
> self.fillGrid()
> File "/home/johnf/downloads/dabo/ide/ClassDesignerPropSheet.py", line 720,
> in fillGrid
> if not self.Application.Selection:
> AttributeError: 'DesignerController' object has no attribute 'Selection'
Confirmed. Regression testing indicates this problem started with [4425].
Here's the log:
{{{
[EMAIL PROTECTED]:~/dabo$ svn log -vr 4425
------------------------------------------------------------------------
r4425 | ed | 2008-08-21 05:29:47 -0700 (Thu, 21 Aug 2008) | 8 lines
Changed paths:
M /trunk/ide/ClassDesigner.py
M /trunk/ide/ClassDesignerControlMixin.py
M /trunk/ide/ClassDesignerEditor.py
M /trunk/ide/ClassDesignerPropSheet.py
Fixed Trac Issue #1165: opening a saved form does not correctly restore the
size of that form.
Fixed a bug in the ClassDesignerEditor that made it hard to delete a method
just by deleting the body of the method.
Fixed the cause of most of the sources that caused the message: "None PROP
DICT:, ROW=..." to print out while starting the Class Designer. It was mostly
the result of an overzealous wx.Grid trying to determine CanGetValueAs() when
the grid was empty. IOW, not an error condition, and thus doesn't merit the
output. There are still some timing issues when creating sizers; I've
suppressed that output under the verboseLogging setting because it is simpler
than getting into the underpinnings of sizer creation.
Added some additional support for dSlidePanelControl. It still is not 100%
solid, but at least it's somewhat workable for now.
------------------------------------------------------------------------
}}}
Looks like there were a few unrelated things changed there. Most likely, it was
changes to ClassDesignerPropSheet because ReportDesigner uses that but not any
of the other files. Here's the diff:
{{{
------------------------------------------------------------------------
[EMAIL PROTECTED]:~/dabo$ svn diff -r 4424:4425 ide/ClassDesignerPropSheet.py
Index: ide/ClassDesignerPropSheet.py
===================================================================
--- ide/ClassDesignerPropSheet.py (revision 4424)
+++ ide/ClassDesignerPropSheet.py (revision 4425)
@@ -708,7 +708,7 @@
if not prop:
return None
try:
- return self.propDict[prop]
+ return self.propDict[prop]
except KeyError, e:
print "PROP DICT ERROR: >%s<, row=%s" % (prop, row)
@@ -716,6 +716,8 @@
def fillGrid(self, force=False):
super(PropertyGrid, self).fillGrid(force)
# Set the renderers and editors manually by cell
+ if not self.Application.Selection:
+ return
valColumn = self.Columns[1]
for row in range(self.RowCount):
pd = self.getPropDictForRow(row)
@@ -751,11 +753,15 @@
if col == 0:
ret = typ in ("str", "string", "unicode", "u")
else:
+ if not self.Application.Selection:
+ return type(None)
pd = self.getPropDictForRow(row)
if not isinstance(pd, dict):
if pd is None:
- print _("None PROP DICT:, ROW="), row
+ if dabo.verboseLogging:
+ # Not technically logging, but
this is such a non-event...
+ print _("None PROP DICT:,
ROW="), row, col, typ
else:
print _("BAD PROP DICT:"), pd,
type(pd), _("ROW="), row
else:
@@ -809,6 +815,9 @@
row = self.CurrentRow
if col is None:
col = self.CurrentColumn
+ if not self.Application.Selection:
+ self.CurrentRow = self.CurrentColumn = 0
+ return
pd = self.getPropDictForRow(row)
if pd is None:
return
}}}
ReportDesigner's App instance is something called DesignerController, defined
in ReportDesigner.py. It looks like the new changes to ClassDesignerPropSheet
assume that the app object will have a property "Selected" which
DesignerController doesn't have.
Ed, can you summarize what the purpose of Selected is and then I can determine
if there's something in DesignerController that is analogous?
Paul
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]