dabo Commit 4294

View: New views
2 Messages — Rating Filter:   Alert me  

dabo Commit 4294

by Ed Leafe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

dabo Commit
Revision 4294
Date: 2008-07-19 09:20:45 -0700 (Sat, 19 Jul 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4294

Changed:
U   trunk/dabo/ui/uiwx/dDialog.py

Log:
Added explicit setting of Accepted to False to the _onCancel() and _onNo() methods. If a dialog was re-used, and Accepted was set to True in the first use, clicking Cancel the second time resulted in Accepted=True again, which is not correct.


Diff:
Modified: trunk/dabo/ui/uiwx/dDialog.py
===================================================================
--- trunk/dabo/ui/uiwx/dDialog.py 2008-07-18 22:19:02 UTC (rev 4293)
+++ trunk/dabo/ui/uiwx/dDialog.py 2008-07-19 16:20:45 UTC (rev 4294)
@@ -366,6 +366,7 @@
  if self.runOK() is not False:
  self.EndModal(kons.DLG_OK)
  def _onCancel(self, evt):
+ self.Accepted = False
  try:
  self.onCancel()
  except TypeError:
@@ -383,6 +384,7 @@
  if self.runYes() is not False:
  self.EndModal(kons.DLG_YES)
  def _onNo(self, evt):
+ self.Accepted = False
  if self.runNo() is not False:
  self.EndModal(kons.DLG_NO)
  def _onHelp(self, evt):




_______________________________________________
Post Messages to: Dabo-dev@...
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/20080719162046.1BC31318320@...

Re: dabo Commit 4294

by Paul McNett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ed Leafe wrote:
> Added explicit setting of Accepted to False to the _onCancel() and _onNo()
> methods. If a dialog was re-used, and Accepted was set to True in the
> first use, clicking Cancel the second time resulted in Accepted=True
> again, which is not correct.

Wow, I was just about to make this exact change. Great minds think alike!

Paul



_______________________________________________
Post Messages to: Dabo-dev@...
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/53552.209.125.109.190.1216486154.squirrel@...
LightInTheBox - Buy quality products at wholesale price