[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r9024 - trunk/gnue-forms/src/uidrivers/win32
From: |
btami |
Subject: |
[gnue] r9024 - trunk/gnue-forms/src/uidrivers/win32 |
Date: |
Fri, 10 Nov 2006 16:31:39 -0600 (CST) |
Author: btami
Date: 2006-11-10 16:31:39 -0600 (Fri, 10 Nov 2006)
New Revision: 9024
Modified:
trunk/gnue-forms/src/uidrivers/win32/UIdriver.py
Log:
handle early errors with exception dialog
Modified: trunk/gnue-forms/src/uidrivers/win32/UIdriver.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/win32/UIdriver.py 2006-11-10 12:36:44 UTC
(rev 9023)
+++ trunk/gnue-forms/src/uidrivers/win32/UIdriver.py 2006-11-10 22:31:39 UTC
(rev 9024)
@@ -96,6 +96,18 @@
win32con.WM_COMMAND : OnWMCommand }
_wndclass = None
+
+ # ---------------------------------------------------------------------------
+ # Constructor
+ # ---------------------------------------------------------------------------
+
+ def __init__(self, eventHandler, name="Undefined", disableSplash=None,
+ parentContainer=None, moduleName=None):
+
+ commonToolkit.GFUserInterface.__init__(self, eventHandler, name,
+ disableSplash, parentContainer, moduleName)
+ self.__splash = None
+
def _wndproc(self, hwnd, msg, wParam, lParam):
try:
@@ -107,6 +119,10 @@
return OnWM(hwnd, msg, wParam, lParam, widget)
+ # ---------------------------------------------------------------------------
+ # Initialize the user interface
+ # ---------------------------------------------------------------------------
+
def _initialize(self):
self._disabledColour = afxres.AFX_IDC_COLOR_LIGHTGRAY
@@ -189,7 +205,11 @@
def _getInput (self, title, fields, cancel = True):
- dialog = dialogs.InputDialog (self._win32app._MainWindowList[0].GetHwnd(),
title, fields, cancel)
+ try:
+ parent = self._win32app._MainWindowList[0].GetHwnd()
+ except:
+ parent = 0
+ dialog = dialogs.InputDialog (parent, title, fields, cancel)
dialog.DoModal ()
return dialog.inputData
@@ -209,8 +229,12 @@
# ---------------------------------------------------------------------------
def _ui_show_exception_(self, group, name, message, detail):
-
- dialog = dialogs.ExceptionDialog
(self._win32app._MainWindowList[0].GetHwnd(), group, name, message, detail)
+
+ try:
+ parent = self._win32app._MainWindowList[0].GetHwnd()
+ except:
+ parent = 0
+ dialog = dialogs.ExceptionDialog (parent, group, name, message, detail)
dialog.DoModal ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r9024 - trunk/gnue-forms/src/uidrivers/win32,
btami <=