commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r6306 - in trunk: gnue-common/src/apps gnue-forms/src


From: reinhard
Subject: r6306 - in trunk: gnue-common/src/apps gnue-forms/src
Date: Thu, 16 Sep 2004 09:54:52 -0500 (CDT)

Author: reinhard
Date: 2004-09-16 09:54:51 -0500 (Thu, 16 Sep 2004)
New Revision: 6306

Modified:
   trunk/gnue-common/src/apps/GBaseApp.py
   trunk/gnue-forms/src/GFClient.py
Log:
Renamed showException to _showException, as it's a virtual non-public method;
pass the uiDriver to the login handler because the curses login handler needs
it.


Modified: trunk/gnue-common/src/apps/GBaseApp.py
===================================================================
--- trunk/gnue-common/src/apps/GBaseApp.py      2004-09-16 14:54:17 UTC (rev 
6305)
+++ trunk/gnue-common/src/apps/GBaseApp.py      2004-09-16 14:54:51 UTC (rev 
6306)
@@ -575,7 +575,7 @@
     overriden by a descendant.
     """
     sys.excepthook = sys.__excepthook__
-    self.showException (*errors.getException (None, etype, value, traceback))
+    self._showException (*errors.getException (None, etype, value, traceback))
     sys.excepthook = self.excepthook
 
 
@@ -583,7 +583,7 @@
   # Show an exception
   # ---------------------------------------------------------------------------
 
-  def showException (self, group, name, message, detail):
+  def _showException (self, group, name, message, detail):
     """
     This function shows an exception specified by the given parameters.
     @param group: Exception group ('system', 'admin', 'application', 'user')

Modified: trunk/gnue-forms/src/GFClient.py
===================================================================
--- trunk/gnue-forms/src/GFClient.py    2004-09-16 14:54:17 UTC (rev 6305)
+++ trunk/gnue-forms/src/GFClient.py    2004-09-16 14:54:51 UTC (rev 6306)
@@ -123,16 +123,21 @@
     else:
       self.disableSplash = self.OPTIONS['no-splash']
 
-    # Assign the proper login handler based upon the user interface choice
-    self.getConnectionManager ().setLoginHandler (self._ui.UILoginHandler ())
-
     # Create the instance that will control the loaded form(s)
     instance = GFInstance (self, self.connections, self._ui,
                            self.disableSplash, userParameters)
 
     # UI is now loaded and in a usable state, so use better exception display
-    self.showException = instance._uiinstance.showException
+    self._showException = instance._uiinstance.showException
 
+    # Assign the proper login handler based upon the user interface choice
+    # FIXME: IMHO, it would be much better if the login handler would be just a
+    # function, which could be a method of the GFUserInterfae object - much
+    # like _showException.  -- Reinhard
+    loginHandler = self._ui.UILoginHandler ()
+    loginHandler.uiDriver = instance._uiinstance
+    self.getConnectionManager ().setLoginHandler (loginHandler)
+
     # assign form file from 1st free argument
     if len (self.ARGUMENTS):
       formfile = self.ARGUMENTS [0]





reply via email to

[Prev in Thread] Current Thread [Next in Thread]