dabo Commit
Revision 6571
Date: 2011-04-18 13:02:59 -0700 (Mon, 18 Apr 2011)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6571
Changed:
U trunk/dabo/lib/reportWriter.py
U trunk/ide/ReportDesigner.py
Log:
Added code to defend against converting anything other than the most common
Frameset/Paragraph. It is possible but unlikely that rfxml's exist in the
wild with multiple subobjects of Frameset, and this will keep those from
getting converted.
Added a little more explanation to the message asking to convert to Memo.
Diff:
Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py 2011-04-18 18:35:03 UTC (rev 6570)
+++ trunk/dabo/lib/reportWriter.py 2011-04-18 20:02:59 UTC (rev 6571)
@@ -1247,7 +1247,9 @@
band = self.ReportForm[b]
bandObjs.append(band)
for b in bandObjs:
- framesets += [(idx,f,b) for (idx,f) in
enumerate(b["Objects"]) if type(f) == Frameset]
+ framesets += [(idx,f,b) for (idx,f) in
enumerate(b["Objects"])
+ if type(f) == Frameset and
len(f["Objects"]) == 1
+ and isinstance(f["Objects"][0],
Paragraph)]
return framesets
Modified: trunk/ide/ReportDesigner.py
===================================================================
--- trunk/ide/ReportDesigner.py 2011-04-18 18:35:03 UTC (rev 6570)
+++ trunk/ide/ReportDesigner.py 2011-04-18 20:02:59 UTC (rev 6571)
@@ -2053,10 +2053,13 @@
rdc.SelectedObjects = [self._rw.ReportForm]
frameset_count = rdc.ReportForm.getFramesetCount()
if frameset_count == 1:
- fs_text = "Frameset"
+ fs_text = "Frameset/Paragraph"
else:
- fs_text = "%s Framesets" % frameset_count
- if frameset_count > 0 and dabo.ui.areYouSure("Would you
like to convert the %s"
+ fs_text = "%s Frameset/Paragraphs" %
frameset_count
+ if frameset_count > 0 and
dabo.ui.areYouSure("Frameset/Paragraph has been consolidated into a "
+ "new Memo object, which is easier to
use and the recommended object for multi-line text. "
+ "You should convert to Memo, and it is
easy to do: just click 'yes' below. \n\n"
+ "Would you like to convert the %s"
" on this report to the new Memo
object?" % fs_text,
cancelButton=False):
rdc.ReportForm.convertParagraphsToMemos()
_______________________________________________
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]