mailr13176 - /branches/gui_testing/gui/wizard.py


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

Header


Content

Posted by edward on June 22, 2011 - 20:46:
Author: bugman
Date: Wed Jun 22 20:46:48 2011
New Revision: 13176

URL: http://svn.gna.org/viewcvs/relax?rev=13176&view=rev
Log:
Created the wizard page base methods on_display(), on_exit() and on_next().

These will be used to perform actions when a page is newly displayed, exited, 
or the next page is
jumped to.


Modified:
    branches/gui_testing/gui/wizard.py

Modified: branches/gui_testing/gui/wizard.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/wizard.py?rev=13176&r1=13175&r2=13176&view=diff
==============================================================================
--- branches/gui_testing/gui/wizard.py (original)
+++ branches/gui_testing/gui/wizard.py Wed Jun 22 20:46:48 2011
@@ -620,6 +620,27 @@
         return field
 
 
+    def on_display(self):
+        """To be over-ridden if an action is to be performed prior to 
displaying the page.
+
+        This method will be called by the wizard class method display_page() 
just after hiding all other pages but prior to displaying this page.
+        """
+
+
+    def on_exit(self):
+        """To be over-ridden if an action is to be performed just before 
exiting the page.
+
+        This method is called when moving 
+        """
+
+
+    def on_next(self):
+        """To be over-ridden if an action is to be performed just before 
moving to the next page.
+
+        This method is called when moving 
+        """
+
+
     def text(self, sizer, desc, default=''):
         """Build the input field.
 
@@ -841,6 +862,9 @@
         for j in range(len(self.pages)):
             self.main_sizer.Hide(self.page_sizers[j])
 
+        # Execute the page's on_display() method.
+        self.page[i].on_display()
+
         # Show the desired page.
         self.main_sizer.Show(self.page_sizers[i])
 
@@ -869,6 +893,9 @@
         @param event:   The wx event.
         @type event:    wx event
         """
+
+        # Execute the page's on_next() method.
+        self.pages[self.current_page].on_next()
 
         # Change the current page.
         self.current_page += 1




Related Messages


Powered by MHonArc, Updated Wed Jun 22 21:00:03 2011