dabo Commit
Revision 2208
Date: 2006-06-06 14:55:13 -0700 (Tue, 06 Jun 2006)
Author: paul

Changed:
U   trunk/dabo/ui/uiwx/dGrid.py
U   trunk/dabo/ui/uiwx/dPemMixin.py

Log:
Fixed a couple problems on Mac where the wxPython object was gone by the time 
the code tried to run.

Diff:
Modified: trunk/dabo/ui/uiwx/dGrid.py
===================================================================
--- trunk/dabo/ui/uiwx/dGrid.py 2006-06-06 21:42:39 UTC (rev 2207)
+++ trunk/dabo/ui/uiwx/dGrid.py 2006-06-06 21:55:13 UTC (rev 2208)
@@ -1898,6 +1898,9 @@
                """See if there are any dynamically-sized columns, and resize 
them
                accordingly.
                """
+               if not self:
+                       # This can be called in a callAfter(), and perhaps we 
are already dead.
+                       return
                dynCols = [col for col in self.Columns 
                                if col.Expand]
                if not dynCols:

Modified: trunk/dabo/ui/uiwx/dPemMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dPemMixin.py     2006-06-06 21:42:39 UTC (rev 2207)
+++ trunk/dabo/ui/uiwx/dPemMixin.py     2006-06-06 21:55:13 UTC (rev 2208)
@@ -720,7 +720,12 @@
                """Raise the passed Dabo event."""
                # Call the Dabo-native raiseEvent(), passing along the 
wx.CallAfter
                # function, so that the Dabo events can be processed at next 
idle.
-               
+       
+               if not self:
+                       # Continuing isn't possible, as the wxPython object is 
already gone.
+                       # Perhaps we should log this too?
+                       return
+       
                ##- 2004/01/07: Problems with segfaults and illegal 
instructions in some cases
                ##-             with the wx.CallAfter. Revert back for now to 
calling in the
                ##-             callstack.




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to