dabo Commit
Revision 6314
Date: 2011-01-14 10:55:36 -0800 (Fri, 14 Jan 2011)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6314
Changed:
U trunk/dabo/ui/uiwx/uiApp.py
Log:
I had a user try to paste text into a pageframe, and got an AttributeError
that the pageframe doesn't have a Replace() method.
Diff:
Modified: trunk/dabo/ui/uiwx/uiApp.py
===================================================================
--- trunk/dabo/ui/uiwx/uiApp.py 2011-01-14 18:03:02 UTC (rev 6313)
+++ trunk/dabo/ui/uiwx/uiApp.py 2011-01-14 18:55:36 UTC (rev 6314)
@@ -695,7 +695,12 @@
success = cb.GetData(data)
cb.Close()
if success:
- win.Replace(selection[0],
selection[1], data.GetText())
+ try:
+
win.Replace(selection[0], selection[1], data.GetText())
+ except (AttributeError,
IndexError, KeyError):
+ # Could have been a
control with a GetSelection() method, such
+ # as a dPageFrame, and
the selection doesn't refer to selected text.
+ pass
def onEditSelectAll(self, evt):
_______________________________________________
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]