reinhard | 6 Nov 2007 10:10

[gnue-contrib] r281 - address/forms

Author: reinhard
Date: 2007-11-06 03:10:51 -0600 (Tue, 06 Nov 2007)
New Revision: 281

Modified:
   address/forms/address.gfd
Log:
Don't start search before focus leaves the search entry.

Modified: address/forms/address.gfd
===================================================================
--- address/forms/address.gfd	2007-10-21 15:25:39 UTC (rev 280)
+++ address/forms/address.gfd	2007-11-06 09:10:51 UTC (rev 281)
 <at>  <at>  -431,9 +431,7  <at>  <at> 

     <logic>
       <block name="blk">
-        <field name="search" datatype="text" length="64" case="upper">
-          <trigger type="POST-CHANGE">act_filter.run()</trigger>
-        </field>
+        <field name="search" datatype="text" length="64" case="upper"/>
       </block>

       <block name="blk_company" datasource="dts_company" startup="empty" editable="N" deletable="N">
 <at>  <at>  -518,6 +516,7  <at>  <at> 
     </action>

     <action name="act_button_focus">
+      act_filter.run()
       # FIXME: get_record_count not available before gnue-forms 0.6-pre1
(Continue reading)

johannes | 7 Nov 2007 09:31

[gnue] r9793 - trunk/gnue-common/src/apps

Author: johannes
Date: 2007-11-07 02:31:52 -0600 (Wed, 07 Nov 2007)
New Revision: 9793

Modified:
   trunk/gnue-common/src/apps/GDebug.py
Log:
Remove default error handler, when loggin into debug-file as requested 
on the commandline

Modified: trunk/gnue-common/src/apps/GDebug.py
===================================================================
--- trunk/gnue-common/src/apps/GDebug.py	2007-10-02 13:57:46 UTC (rev 9792)
+++ trunk/gnue-common/src/apps/GDebug.py	2007-11-07 08:31:52 UTC (rev 9793)
 <at>  <at>  -229,6 +229,12  <at>  <at> 
         __builtin__.__dict__ ['gLeave'] = gLeave

         if file is not None:
+            # If the user requested a debug-file on the command line, first
+            # make sure to get rid of all previously installed handlers
+            rlg = logging.getLogger('')
+            while rlg.handlers:
+                rlg.removeHandler(rlg.handlers[0])
+
             lgr = logging.getLogger('gnue')
             fmt = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
             hnd = logging.FileHandler(file, 'a+')
johannes | 7 Nov 2007 15:41

[gnue-contrib] r282 - address/forms

Author: johannes
Date: 2007-11-07 08:41:55 -0600 (Wed, 07 Nov 2007)
New Revision: 282

Modified:
   address/forms/address.gfd
Log:
Only perform queries if the search value has changed

Modified: address/forms/address.gfd
===================================================================
--- address/forms/address.gfd	2007-11-06 09:10:51 UTC (rev 281)
+++ address/forms/address.gfd	2007-11-07 14:41:55 UTC (rev 282)
 <at>  <at>  -418,6 +418,7  <at>  <at> 

   <dialog name="dlg_search_company" title="Suche nach Firma">
     <parameter name="prm_result" datatype="number" length="8" scale="0"/>
+    <parameter name="prm_search" datatype="text" length="100" />

     <trigger type="ON-ACTIVATION">act_initialize.run()</trigger>

 <at>  <at>  -473,6 +474,7  <at>  <at> 
       blk.search.value = None
       blk_company.clear()
       setFocus(blk.search)
+      setParameter('prm_search', '')
     </action>

     <action name="act_filter">
 <at>  <at>  -508,11 +510,15  <at>  <at> 
(Continue reading)

johannes | 7 Nov 2007 16:27

[gnue-contrib] r283 - address/forms

Author: johannes
Date: 2007-11-07 09:27:04 -0600 (Wed, 07 Nov 2007)
New Revision: 283

Modified:
   address/forms/address.gfd
Log:
Make sure to also delete contact details when a company is deleted

Modified: address/forms/address.gfd
===================================================================
--- address/forms/address.gfd	2007-11-07 14:41:55 UTC (rev 282)
+++ address/forms/address.gfd	2007-11-07 15:27:04 UTC (rev 283)
 <at>  <at>  -93,6 +93,14  <at>  <at> 
       <trigger type="POST-FOCUSIN">
         blk_company.contact_count.value = blk_contact.get_record_count()
       </trigger>
+
+      <trigger type="PRE-DELETE">
+        blk_contact.first_record()
+
+        while blk_contact.get_record_status() != 'empty':
+            blk_contact.delete_record()
+            blk_contact.next_record()
+      </trigger>
     </block>

     <block name="blk_contact" datasource="dts_contact">
johannes | 8 Nov 2007 09:09

[gnue-contrib] r284 - address/forms

Author: johannes
Date: 2007-11-08 02:09:34 -0600 (Thu, 08 Nov 2007)
New Revision: 284

Modified:
   address/forms/address.gfd
Log:
Add a fix for deleting the detail records

Modified: address/forms/address.gfd
===================================================================
--- address/forms/address.gfd	2007-11-07 15:27:04 UTC (rev 283)
+++ address/forms/address.gfd	2007-11-08 08:09:34 UTC (rev 284)
 <at>  <at>  -95,11 +95,12  <at>  <at> 
       </trigger>

       <trigger type="PRE-DELETE">
-        blk_contact.first_record()
-
-        while blk_contact.get_record_status() != 'empty':
-            blk_contact.delete_record()
-            blk_contact.next_record()
+        # TODO: This should be solved using the already existing blocks
+        backend = globals().get('address')
+        if backend is not None:
+            cid = blk_company.id.value
+            cmd = 'DELETE FROM contact WHERE company=%d' % cid
+            backend.sql(cmd);
       </trigger>
     </block>
(Continue reading)

reinhard | 8 Nov 2007 10:12

[gnue] r9794 - trunk/gnue-forms/src/GFObjects

Author: reinhard
Date: 2007-11-08 03:12:20 -0600 (Thu, 08 Nov 2007)
New Revision: 9794

Modified:
   trunk/gnue-forms/src/GFObjects/GFBlock.py
Log:
Added new FIXME comment.

Modified: trunk/gnue-forms/src/GFObjects/GFBlock.py
===================================================================
--- trunk/gnue-forms/src/GFObjects/GFBlock.py	2007-11-07 08:31:52 UTC (rev 9793)
+++ trunk/gnue-forms/src/GFObjects/GFBlock.py	2007-11-08 09:12:20 UTC (rev 9794)
 <at>  <at>  -340,7 +340,10  <at>  <at> 
     def __ds_resultset_activated(self, event):

         # Don't let the user interface follow while we iterating through the
-        # detail resultsets for the commit triggers
+        # detail resultsets for the commit triggers.
+        # FIXME: This also means that detail blocks don't contain the correct
+        # result set at PRE-INSERT/PRE-UPDATE/PRE-DELETE trigger execution of
+        # the master block.
         if self.mode == 'commit':
             return

johannes | 12 Nov 2007 15:32

[gnue] r9795 - trunk/gnue-common/src/apps

Author: johannes
Date: 2007-11-12 08:32:37 -0600 (Mon, 12 Nov 2007)
New Revision: 9795

Modified:
   trunk/gnue-common/src/apps/errors.py
Log:
Use the given exception type for determining the excpetions' name

Modified: trunk/gnue-common/src/apps/errors.py
===================================================================
--- trunk/gnue-common/src/apps/errors.py	2007-11-08 09:12:20 UTC (rev 9794)
+++ trunk/gnue-common/src/apps/errors.py	2007-11-12 14:32:37 UTC (rev 9795)
 <at>  <at>  -252,7 +252,7  <at>  <at> 
   aTrace = aTrace or sTrace

   if isinstance (aValue, gException):
-    return (aValue.getGroup (), aValue.getName (), aValue.getMessage (),
+    return (aValue.getGroup (), aValue.getName (aType), aValue.getMessage (),
             aValue.getDetail (count, aType, aValue, aTrace))
   else:
     # Exception was not a descendant of gException, so we construct the tuple
johannes | 12 Nov 2007 15:34

[gnue] r9796 - trunk/gnue-common/src/base

Author: johannes
Date: 2007-11-12 08:34:58 -0600 (Mon, 12 Nov 2007)
New Revision: 9796

Modified:
   trunk/gnue-common/src/base/log.py
Log:
Use a separate logger per exception following this pattern:
"exception.<group>.<classname>"

issue123 in-progress

Modified: trunk/gnue-common/src/base/log.py
===================================================================
--- trunk/gnue-common/src/base/log.py	2007-11-12 14:32:37 UTC (rev 9795)
+++ trunk/gnue-common/src/base/log.py	2007-11-12 14:34:58 UTC (rev 9796)
 <at>  <at>  -36,6 +36,7  <at>  <at> 
 import traceback

 from gnue.common.base import utils
+from gnue.common.apps import errors

 __all__ = ['logged_f', 'deprecated_f',
         'logged_f_n', 'deprecated_f_n',
 <at>  <at>  -309,14 +310,10  <at>  <at> 
      <at> param etraceback: Exception traceback
      <at> type etraceback: traceback
     """
-    # TODO: log to exception.system, exception.admin, or exception.application,
-    # depending on the exception group of gException.
(Continue reading)

johannes | 13 Nov 2007 13:57

[gnue] r9797 - trunk/gnue-common/src/base

Author: johannes
Date: 2007-11-13 06:57:29 -0600 (Tue, 13 Nov 2007)
New Revision: 9797

Modified:
   trunk/gnue-common/src/base/log.py
Log:
Use exception information as returned by getException() instead of using 
the default Formatters' formatException()

issue123 in-progress

Modified: trunk/gnue-common/src/base/log.py
===================================================================
--- trunk/gnue-common/src/base/log.py	2007-11-12 14:34:58 UTC (rev 9796)
+++ trunk/gnue-common/src/base/log.py	2007-11-13 12:57:29 UTC (rev 9797)
 <at>  <at>  -313,8 +313,8  <at>  <at> 
     (group, name, message, detail) = errors.getException(None, etype, evalue,
             etraceback)
     logger = "exception.%s.%s" % (group, etype)
-    error_n(logger, "Unhandled exception occured",
-            exc_info=(etype, evalue, etraceback))
+    text = u_("Unhandled exception %s:\n%s") % (name, detail)
+    error_n(logger, text)

 # -----------------------------------------------------------------------------
 # Exception and call stack logging
johannes | 13 Nov 2007 15:07

[gnue] r9798 - trunk/gnue-common/etc

Author: johannes
Date: 2007-11-13 08:07:03 -0600 (Tue, 13 Nov 2007)
New Revision: 9798

Added:
   trunk/gnue-common/etc/sample.log.conf
Log:
Added sample configuration for logging

Added: trunk/gnue-common/etc/sample.log.conf
===================================================================
--- trunk/gnue-common/etc/sample.log.conf	2007-11-13 12:57:29 UTC (rev 9797)
+++ trunk/gnue-common/etc/sample.log.conf	2007-11-13 14:07:03 UTC (rev 9798)
 <at>  <at>  -0,0 +1,80  <at>  <at> 
+# Configuration file for GNU Enterprise logging facilities
+#
+
+# Define which loggers are specified in this configuration file
+[loggers]
+keys=root,search,apperror,appforms
+
+# Define which handlers are specified in this configuration file
+[handlers]
+keys=default,searchhd,apperr,appforms
+
+# Define which formatters are specified in this configuration file
+[formatters]
+keys=default,appforms
+
+[logger_root]
(Continue reading)


Gmane