Changeset e3f721e4 in sasview


Ignore:
Timestamp:
Apr 15, 2010 11:14:04 AM (14 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
8ea48a0
Parents:
e825f72
Message:

add message for the status bar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • invariantview/perspectives/invariant/invariant_panel.py

    re825f72 re3f721e4  
    7373        if self.parent is not None: 
    7474            msg = "" 
    75             wx.PostEvent(self.parent, StatusEvent(status=msg)) 
     75            wx.PostEvent(self.parent,StatusEvent(status=msg, info="info")) 
    7676        self.SetupScrolling() 
    7777        
     
    8181        """ 
    8282        flag = False 
     83        self.hint_msg_txt.SetLabel('') 
    8384        #edit the panel 
    8485        if self._data is not None: 
     
    8788                msg = "Invariant: one of your q-values is zero. Delete that entry before proceeding" 
    8889                self.hint_msg_txt.SetLabel(msg) 
    89                 wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop"))  
    90         self.hint_msg_txt.SetLabel('') 
     90                wx.PostEvent(self.parent, StatusEvent(status=msg, 
     91                                                      info="warning", 
     92                                                      type="stop"))  
    9193        return flag 
    9294     
     
    196198            except: 
    197199                msg= "Error occurred computing volume fraction: %s"%sys.exc_value 
    198                 wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 
     200                wx.PostEvent(self.parent, StatusEvent(status=msg, 
     201                                                      info="error", 
     202                                                      type="stop")) 
    199203                
    200204    def get_surface(self, inv, contrast, porod_const, extrapolation): 
     
    210214            except: 
    211215                msg = "Error occurred computing specific surface: %s"%sys.exc_value 
    212                 wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 
     216                wx.PostEvent(self.parent, StatusEvent(status=msg, info="error", 
     217                                                       type="stop")) 
    213218                 
    214219    def get_total_qstar(self, inv, extrapolation): 
     
    355360        """ 
    356361        msg= "" 
    357         wx.PostEvent(self.parent, StatusEvent(status= msg)) 
     362        wx.PostEvent(self.parent, StatusEvent(status=msg)) 
    358363        if self._data is None or self.err_check_on_data(): 
    359364            return 
     
    379384            inv, npts_high = self.set_extrapolation_high(inv=inv, high_q=high_q) 
    380385        except: 
    381             raise 
    382             #msg= "Error occurred computing invariant: %s"%sys.exc_value 
    383             #wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 
     386            msg = "Error occurred computing invariant: %s"%sys.exc_value 
     387            wx.PostEvent(self.parent, StatusEvent(status=msg, 
     388                                                 info="warning",type="stop")) 
    384389            return 
    385390        #check the type of extrapolation 
     
    391396        except: 
    392397            msg= "Error occurred computing invariant: %s"%sys.exc_value 
    393             wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 
     398            wx.PostEvent(self.parent, StatusEvent(status=msg,  
     399                                                  info="warning",type="stop")) 
    394400            return 
    395401        #Compute qstar extrapolated to low q range  
     
    408414        except: 
    409415            msg = "Error occurred computing invariant: %s"%sys.exc_value 
    410             wx.PostEvent(self.parent, StatusEvent(status=msg)) 
     416            wx.PostEvent(self.parent, StatusEvent(status=msg, 
     417                                                  info="warning",type="stop")) 
    411418        try: 
    412419            self.get_surface(inv=inv, contrast=contrast, porod_const=porod_const,  
     
    414421        except: 
    415422            msg = "Error occurred computing invariant: %s"%sys.exc_value 
    416             wx.PostEvent(self.parent, StatusEvent(status= msg)) 
     423            wx.PostEvent(self.parent, StatusEvent(status=msg, 
     424                                                  info="warning",type="stop")) 
    417425             
    418426        #compute percentage of each invariant 
Note: See TracChangeset for help on using the changeset viewer.