jan | 2 Feb 2004 20:20

r5062 - trunk/gnue-appserver/src

Author: jan
Date: 2004-02-02 13:20:22 -0600 (Mon, 02 Feb 2004)
New Revision: 5062

Modified:
   trunk/gnue-appserver/src/geasInstance.py
   trunk/gnue-appserver/src/geasSessionManager.py
Log:
switch to gnue-common logic API to implement procedures
(python language is tested and works)

Modified: trunk/gnue-appserver/src/geasInstance.py
===================================================================
--- trunk/gnue-appserver/src/geasInstance.py	2004-01-31 19:36:05 UTC (rev 5061)
+++ trunk/gnue-appserver/src/geasInstance.py	2004-02-02 19:20:22 UTC (rev 5062)
 <at>  <at>  -24,6 +24,8  <at>  <at> 
 import types
 import mx.DateTime
 import mx.DateTime.ISO
+from gnue.common.logic.language.Base import loadLanguageEngine, LangIfRuntimeError
+from gnue.appserver.language import Object

 # =============================================================================
 # Instance class
 <at>  <at>  -263,27 +265,48  <at>  <at> 

     # TODO: This should run in a separate process so that a segfaulting
     # procedure doesn't kill appserver.
-    # TODO: We should use gnue-common's logic interface here.
+    # (needs to be implemented as an option in gnue-common)
(Continue reading)

jan | 2 Feb 2004 21:28

r5063 - trunk/gnue-appserver/src

Author: jan
Date: 2004-02-02 14:28:18 -0600 (Mon, 02 Feb 2004)
New Revision: 5063

Modified:
   trunk/gnue-appserver/src/geasInstance.py
Log:
add language interface functions (untested yet)

Modified: trunk/gnue-appserver/src/geasInstance.py
===================================================================
--- trunk/gnue-appserver/src/geasInstance.py	2004-02-02 19:20:22 UTC (rev 5062)
+++ trunk/gnue-appserver/src/geasInstance.py	2004-02-02 20:28:18 UTC (rev 5063)
 <at>  <at>  -25,7 +25,7  <at>  <at> 
 import mx.DateTime
 import mx.DateTime.ISO
 from gnue.common.logic.language.Base import loadLanguageEngine, LangIfRuntimeError
-from gnue.appserver.language import Object
+from gnue.appserver.language import Object, Session

 # =============================================================================
 # Instance class
 <at>  <at>  -272,6 +272,9  <at>  <at> 
                          self._classdef.fullName,
                          {"gnue_id": self._getValue ("gnue_id")})

+    # Create a session object which with the actual session id
+    sess = Session.Session (self._session.sm, self._session.id)
+
     # fetch the procedure definition
(Continue reading)

jan | 2 Feb 2004 23:07

r5064 - in trunk: gnue-appserver/src gnue-common/src/logic/language gnue-common/src/logic/language/python

Author: jan
Date: 2004-02-02 16:07:47 -0600 (Mon, 02 Feb 2004)
New Revision: 5064

Modified:
   trunk/gnue-appserver/src/geasInstance.py
   trunk/gnue-common/src/logic/language/Base.py
   trunk/gnue-common/src/logic/language/python/Adapter.py
Log:
improve error handling by passing a context description 

Modified: trunk/gnue-appserver/src/geasInstance.py
===================================================================
--- trunk/gnue-appserver/src/geasInstance.py	2004-02-02 20:28:18 UTC (rev 5063)
+++ trunk/gnue-appserver/src/geasInstance.py	2004-02-02 22:07:47 UTC (rev 5064)
 <at>  <at>  -287,7 +287,11  <at>  <at> 
       rtlist =  self._session.sm._langRuntimes

     cx=rtlist[language].createNewContext()
-    
+
+    # describe the context
+    cx.setDescription('%s.%s' % (self._classdef.fullName,procedurename),
+                      'a gnue-appserver procedure')
+
     # the object itself
     cx.bindObject(  'self', obj, Object.Object)

 <at>  <at>  -302,21 +306,13  <at>  <at> 
     cx.bindFunction('direct_load',    self._session.load)
(Continue reading)

johannes | 4 Feb 2004 17:06

r5066 - trunk/gnue-appserver/src/language

Author: johannes
Date: 2004-02-04 10:06:16 -0600 (Wed, 04 Feb 2004)
New Revision: 5066

Modified:
   trunk/gnue-appserver/src/language/ObjectList.py
Log:
Added missing line continuation symbol :(

Modified: trunk/gnue-appserver/src/language/ObjectList.py
===================================================================
--- trunk/gnue-appserver/src/language/ObjectList.py	2004-02-04 16:04:22 UTC (rev 5065)
+++ trunk/gnue-appserver/src/language/ObjectList.py	2004-02-04 16:06:16 UTC (rev 5066)
 <at>  <at>  -130,7 +130,7  <at>  <at> 
         return idx
       idx += 1

-    raise ValueError, "No %s.%s with a value of '%s' found." % 
+    raise ValueError, "No %s.%s with a value of '%s' found." % \
                       (self.classname, key, value)
johannes | 4 Feb 2004 17:04

r5065 - in trunk/gnue-appserver/src: . classrep language

Author: johannes
Date: 2004-02-04 10:04:22 -0600 (Wed, 04 Feb 2004)
New Revision: 5065

Added:
   trunk/gnue-appserver/src/language/Exceptions.py
Modified:
   trunk/gnue-appserver/src/classrep/Base.py
   trunk/gnue-appserver/src/classrep/Class.py
   trunk/gnue-appserver/src/classrep/Module.py
   trunk/gnue-appserver/src/classrep/Procedure.py
   trunk/gnue-appserver/src/classrep/Property.py
   trunk/gnue-appserver/src/classrep/__init__.py
   trunk/gnue-appserver/src/classrep/test.py
   trunk/gnue-appserver/src/geasInstance.py
   trunk/gnue-appserver/src/language/Object.py
   trunk/gnue-appserver/src/language/ObjectList.py
   trunk/gnue-appserver/src/language/Procedure.py
   trunk/gnue-appserver/src/language/Session.py
   trunk/gnue-appserver/src/language/test.py
   trunk/gnue-appserver/src/test.py
Log:
Removed caching-stuff from language interface and changed the constructors
of language interface and classrepository to use language/Session instead of
sessionManager and sessionId. Made sure to use proper 'underlining' for
private/protected and public identifiers.

Modified: trunk/gnue-appserver/src/classrep/Base.py
===================================================================
--- trunk/gnue-appserver/src/classrep/Base.py	2004-02-02 22:07:47 UTC (rev 5064)
(Continue reading)

johannes | 5 Feb 2004 10:55

r5067 - in trunk/gnue-appserver/src: . language

Author: johannes
Date: 2004-02-05 03:55:20 -0600 (Thu, 05 Feb 2004)
New Revision: 5067

Modified:
   trunk/gnue-appserver/src/geasInstance.py
   trunk/gnue-appserver/src/language/Session.py
   trunk/gnue-appserver/src/language/test.py
Log:
Session.find () uses qualification too. Object.Object has no longer a 
method store ().

Modified: trunk/gnue-appserver/src/geasInstance.py
===================================================================
--- trunk/gnue-appserver/src/geasInstance.py	2004-02-04 16:06:16 UTC (rev 5066)
+++ trunk/gnue-appserver/src/geasInstance.py	2004-02-05 09:55:20 UTC (rev 5067)
 <at>  <at>  -314,7 +314,7  <at>  <at> 
       retcode = -1

     # Save changes made by the procedure
-    obj.store ()
+    # obj.store ()

     # return value of '1' to make XMLRPC happy
     return retcode or 1

Modified: trunk/gnue-appserver/src/language/Session.py
===================================================================
--- trunk/gnue-appserver/src/language/Session.py	2004-02-04 16:06:16 UTC (rev 5066)
+++ trunk/gnue-appserver/src/language/Session.py	2004-02-05 09:55:20 UTC (rev 5067)
(Continue reading)

johannes | 5 Feb 2004 13:26

r5068 - trunk/gnue-appserver/src/language

Author: johannes
Date: 2004-02-05 06:26:19 -0600 (Thu, 05 Feb 2004)
New Revision: 5068

Modified:
   trunk/gnue-appserver/src/language/Object.py
   trunk/gnue-appserver/src/language/ObjectList.py
Log:
ObjectList is an immutable sequence now.
Object returns None on access to an unloadable property.

Modified: trunk/gnue-appserver/src/language/Object.py
===================================================================
--- trunk/gnue-appserver/src/language/Object.py	2004-02-05 09:55:20 UTC (rev 5067)
+++ trunk/gnue-appserver/src/language/Object.py	2004-02-05 12:26:19 UTC (rev 5068)
 <at>  <at>  -62,9 +62,14  <at>  <at> 
       sid  = self.__session.getSessionId ()

       if self.objectId:
-        res = sm.load (sid, self.__class, [self.objectId, ''], [name])
-        (value, datatype) = (res [0][0], res [1][0])
+        try:
+          res = sm.load (sid, self.__class, [self.objectId, ''], [name])
+          (value, datatype) = (res [0][0], res [1][0])

+        except:
+          # TODO: use a more specific exception 
+          return None
+
       # if no objectId is available we assume it's a new object
(Continue reading)

jan | 5 Feb 2004 17:20

r5069 - trunk/gnue-common/src/datasources

Author: jan
Date: 2004-02-05 10:19:59 -0600 (Thu, 05 Feb 2004)
New Revision: 5069

Modified:
   trunk/gnue-common/src/datasources/GConnections.py
Log:
add error message indicating that a driver still uses the old dbdriver api

Modified: trunk/gnue-common/src/datasources/GConnections.py
===================================================================
--- trunk/gnue-common/src/datasources/GConnections.py	2004-02-05 12:26:19 UTC (rev 5068)
+++ trunk/gnue-common/src/datasources/GConnections.py	2004-02-05 16:19:59 UTC (rev 5069)
 <at>  <at>  -245,6 +245,11  <at>  <at> 
       tmsg = _("No database driver found for provider type '%s'") % driver
       raise Exceptions.ProviderNotSupportedError, tmsg

+    if not hasattr(dbdriver,"Connection"):
+      tmsg = _("The database driver '%s' doesn't have a 'Connection' object.\n"+\
+               "It has to be updated to the new driver API. --- "+\
+               "Please contact a gnue developer.") % driver
+      raise Exceptions.ProviderNotSupportedError, tmsg      

     conn = dbdriver.Connection(self, connection_name, parameters)
     self._openConnections[connection_name] = conn
jcater | 5 Feb 2004 21:08

r5070 - trunk/gnue-common/src/apps

Author: jcater
Date: 2004-02-05 14:08:08 -0600 (Thu, 05 Feb 2004)
New Revision: 5070

Modified:
   trunk/gnue-common/src/apps/GDebug.py
   trunk/gnue-common/src/apps/__init__.py
Log:
added gDebug builtin

Modified: trunk/gnue-common/src/apps/GDebug.py
===================================================================
--- trunk/gnue-common/src/apps/GDebug.py	2004-02-05 16:19:59 UTC (rev 5069)
+++ trunk/gnue-common/src/apps/GDebug.py	2004-02-05 20:08:08 UTC (rev 5070)
 <at>  <at>  -32,6 +32,7  <at>  <at> 
 import string
 import sys
 from traceback import *
+import __builtin__

 _fh = sys.__stderr__
 _conttest = 0
 <at>  <at>  -70,6 +71,7  <at>  <at> 
     catchStderr( fh )
   else:
     catchStderr( sys.__stderr__ )
+  __builtin__.__dict__['gDebug'] = printMesg

 
 def catchStderr(fh):
(Continue reading)

jcater | 6 Feb 2004 00:13

r5071 - in trunk: gnue-common/src/cursing gnue-forms/src/uidrivers/curses gnue-forms/src/uidrivers/curses/widgets gnue-forms/src/uidrivers/curses/widgets/form

Author: jcater
Date: 2004-02-05 17:13:16 -0600 (Thu, 05 Feb 2004)
New Revision: 5071

Removed:
   trunk/gnue-common/src/cursing/Event.py
Modified:
   trunk/gnue-common/src/cursing/Button.py
   trunk/gnue-common/src/cursing/CheckBox.py
   trunk/gnue-common/src/cursing/CheckBoxGroup.py
   trunk/gnue-common/src/cursing/ColorScheme.py
   trunk/gnue-common/src/cursing/ComboBox.py
   trunk/gnue-common/src/cursing/Control.py
   trunk/gnue-common/src/cursing/Dialog.py
   trunk/gnue-common/src/cursing/DirChooser.py
   trunk/gnue-common/src/cursing/FileSelectPad.py
   trunk/gnue-common/src/cursing/FileSelector.py
   trunk/gnue-common/src/cursing/FocusedLabel.py
   trunk/gnue-common/src/cursing/Frame.py
   trunk/gnue-common/src/cursing/GraphicObject.py
   trunk/gnue-common/src/cursing/GroupBox.py
   trunk/gnue-common/src/cursing/InputBox.py
   trunk/gnue-common/src/cursing/Label.py
   trunk/gnue-common/src/cursing/Menu.py
   trunk/gnue-common/src/cursing/MenuBar.py
   trunk/gnue-common/src/cursing/MenuItem.py
   trunk/gnue-common/src/cursing/MsgBoxOK.py
   trunk/gnue-common/src/cursing/MsgBoxTimer.py
   trunk/gnue-common/src/cursing/MsgBoxYesNo.py
   trunk/gnue-common/src/cursing/Notebook.py
(Continue reading)


Gmane