mailr14522 - in /1.3/gui: interpreter.py user_functions/base.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on August 30, 2011 - 15:34:
Author: bugman
Date: Tue Aug 30 15:34:11 2011
New Revision: 14522

URL: http://svn.gna.org/viewcvs/relax?rev=14522&view=rev
Log:
The notification of observers in status.observers.gui_uf has been modified.

The GUI user function pages no longer perform this as the calls to the 
interpreter are via the
interpreter thread, hence the completion of the page does not signal the 
completion of the user
function.  Instead the interpreter thread (and the synchronous apply() call 
as well) perform the
notification once complete.


Modified:
    1.3/gui/interpreter.py
    1.3/gui/user_functions/base.py

Modified: 1.3/gui/interpreter.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/interpreter.py?rev=14522&r1=14521&r2=14522&view=diff
==============================================================================
--- 1.3/gui/interpreter.py (original)
+++ 1.3/gui/interpreter.py Tue Aug 30 15:34:11 2011
@@ -103,6 +103,9 @@
         # Execute the user function.
         apply(fn, args, kwds)
 
+        # Notify all observers that a user function has completed.
+        status.observers.gui_uf.notify()
+
 
     def empty(self):
         """Determine if the interpreter thread queue is empty.
@@ -260,3 +263,6 @@
             # Release the lock.
             finally:
                 status.exec_lock.release()
+
+            # Notify all observers that a user function has completed.
+            status.observers.gui_uf.notify()

Modified: 1.3/gui/user_functions/base.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/user_functions/base.py?rev=14522&r1=14521&r2=14522&view=diff
==============================================================================
--- 1.3/gui/user_functions/base.py (original)
+++ 1.3/gui/user_functions/base.py Tue Aug 30 15:34:11 2011
@@ -260,13 +260,6 @@
         sizer.AddSpacer(5)
 
 
-    def on_completion(self):
-        """Notify that the user function has completed."""
-
-        # Notify.
-        status.observers.gui_uf.notify()
-
-
     def process_doc(self, doc):
         """Process the documentation list.
 




Related Messages


Powered by MHonArc, Updated Tue Aug 30 16:00:02 2011