Changeset af91b68 in sasview for prview/perspectives/pr


Ignore:
Timestamp:
Jan 22, 2011 10:22:32 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:
88989768
Parents:
8f7936f
Message:

addd error dialog

Location:
prview/perspectives/pr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • prview/perspectives/pr/pr.py

    r75a7ece raf91b68  
    3232from DataLoader.data_info import Data1D as LoaderData1D 
    3333import DataLoader 
    34 from sans.guiframe.data_loader import load_error  
     34from pr_widgets import load_error  
    3535from sans.guiframe.plugin_base import PluginBase 
    3636 
  • prview/perspectives/pr/pr_widgets.py

    r75a7ece raf91b68  
    194194            if rbox.GetValue(): 
    195195                return data  
     196def load_error(error=None): 
     197    """ 
     198    Pop up an error message. 
     199     
     200    :param error: details error message to be displayed 
     201    """ 
     202    message = "The data file you selected could not be loaded.\n" 
     203    message += "Make sure the content of your file is properly formatted.\n\n" 
     204     
     205    if error is not None: 
     206        message += "When contacting the DANSE team, mention the" 
     207        message += " following:\n%s" % str(error) 
     208     
     209    dial = wx.MessageDialog(None, message, 'Error Loading File', 
     210                            wx.OK | wx.ICON_EXCLAMATION) 
     211    dial.ShowModal()     
     212 
Note: See TracChangeset for help on using the changeset viewer.