Index: guiframe/.current_version
===================================================================
--- guiframe/.current_version	(revision f444b20f1e24695fba634d38bf4839ddd05e95a6)
+++ guiframe/.current_version	(revision f444b20f1e24695fba634d38bf4839ddd05e95a6)
@@ -0,0 +1,1 @@
+0.2.3
Index: guiframe/dataFitting.py
===================================================================
--- guiframe/dataFitting.py	(revision 32c0841e02d6c59dd5e7872fdba98ea9afb790b9)
+++ guiframe/dataFitting.py	(revision f444b20f1e24695fba634d38bf4839ddd05e95a6)
@@ -13,4 +13,5 @@
 from DataLoader.data_info import Data2D as LoadData2D
 
+
 class Data1D(PlotData1D, LoadData1D):
     """
@@ -28,4 +29,6 @@
         self.group_id = None
         self.is_data = True
+        self.path = None
+        self.title = ""
     
     def copy_from_datainfo(self, data1d):
@@ -46,4 +49,5 @@
         self.xaxis(data1d._xaxis, data1d._xunit)
         self.yaxis(data1d._yaxis, data1d._yunit)
+        self.title = data1d.title
         
     def __str__(self):
@@ -80,4 +84,6 @@
         return result
     
+  
+    
 class Theory1D(PlotTheory1D, LoadData1D):
     """
@@ -95,4 +101,6 @@
         self.group_id = None
         self.is_data = True
+        self.path = None
+        self.title = ""
     
     def copy_from_datainfo(self, data1d):
@@ -111,4 +119,5 @@
         self.xaxis(data1d._xaxis, data1d._xunit)
         self.yaxis(data1d._yaxis, data1d._yunit)
+        self.title = data1d.title
         
     def __str__(self):
@@ -162,4 +171,8 @@
                             dqx_data=dqx_data, dqy_data=dqy_data,
                             q_data=q_data, mask=mask)
+        self.id = None
+        self.path = None
+        self.title = ""
+      
         
     def copy_from_datainfo(self, data2d):
@@ -189,4 +202,5 @@
         self.xaxis(data2d._xaxis, data2d._xunit)
         self.yaxis(data2d._yaxis, data2d._yunit)
+        self.title = data2d.title
         
     def __str__(self):
Index: guiframe/data_manager.py
===================================================================
--- guiframe/data_manager.py	(revision 32c0841e02d6c59dd5e7872fdba98ea9afb790b9)
+++ guiframe/data_manager.py	(revision f444b20f1e24695fba634d38bf4839ddd05e95a6)
@@ -12,22 +12,55 @@
 available all data loaded  for the current perspective. 
 
-All modules creating
-fake Data posts their data to data_manager . Data_manager  make these new data 
-available for all other perspectives.
+All modules "creating Data" posts their data to data_manager . 
+Data_manager  make these new data available for all other perspectives.
 """
 
+import logging
+logging.basicConfig(level=logging.DEBUG,
+                    format='%(asctime)s %(levelname)s %(message)s',
+                    filename='sans_app.log',
+                    filemode='w')    
+  
 class DataManager(object):
     """
-     Manage a list of data
+    Manage a list of data
     """
-    def __init__(self, parent):
+    def __init__(self):
         """
         Store opened path and data object created at the loading time
+        :param auto_plot: if True the datamanager sends data to plotting 
+                            plugin. 
+        :param auto_set_data: if True the datamanager sends to the current
+        perspective
         """
-        self.loaded_data_list = []
-        self.created_data_list = []
-        self.list_of_data = []
+        self._selected_data = []
+        self.stored_data = {}
         self.message = ""
-        self.parent = parent
+      
+    def add_data(self, data_list):
+        """
+        receive a list of 
+        """
+        self._selected_data = []
+        for data in data_list:
+            if data.id  in self.stored_data:
+                msg = "Data manager already stores %s" % str(data.name)
+                msg += ""
+                logging.info(msg)
+            self._selected_data.append(data)
+            self.stored_data[id] = data
+            
+    def set_auto_plot(self, flag=False):
+        """
+        When flag is true the data is plotted automatically
+        """
+        self._auto_set_data = flag
+        
+    def set_auto_set_data(self, flag=False):
+        """
+        When flag is true the data is send to the current perspective
+        automatically
+        """
+        self._auto_set_data = flag
         
     def get_message(self):
@@ -37,34 +70,60 @@
         return self.message
     
-    def set_loaded_data(self, data_list=None):
+    def get_by_id(self, id_list=None):
+        """
+        get a list of data given a list of id
+        """
+        self._selected_data = []
+        for id in id_list:
+            if id in self.stored_data:
+                self._selected_data.append(self.stored_data[id])
+        return self._selected_data
+    
+    def delete_by_id(self, id_list=None):
         """
         save data and path
         """
-        if data_list is None:
-            return
-        for data, path in data_list:
-            if data.name not in self.list_of_data:
-                self.loaded_data_list.append((data, path))
-                self.list_of_data.append(data.name)
-            else:
-                self.message += " %s already loaded" % str(data.name)
+        for id in id_list:
+            if id in self.stored_data:
+                data = self.stored_data[id]
+                if data in self._selected_data:
+                    self._selected_data.remove(data)
+                del self.stored_data[id]
+    
+    def get_by_name(self, name_list=None):
+        """
+        return a list of data given a list of data names
+        """
+        self._selected_data = []
+        for selected_name in name_list:
+            for data in self.stored_data.values():
+                if data.name == selected_name:
+                    self._selected_data.append(data)
+        return self._selected_data
+    
+    def delete_by_name(self, name_list=None):
+        """
+        save data and path
+        """
+        for selected_name in name_list:
+            for data in self.stored_data.values():
+                if data.name == selected_name:
+                    if data in self._selected_data:
+                        self._selected_data.remove(data)
+                    if data.id in self.stored_data:
+                        del self.stored_data[data.id]
+
+    def get_selected_data(self):
+        """
+        Send list of selected data
+        """
+        return self._selected_data
+    
+    def get_all_data(self):
+        """
+        return list of all available data
+        """
+        return self.stored_data.values()
+    
+
         
-    def set_created_data(self, data_list=None):
-        """
-        return 
-        """
-        if data_list is None:
-            return
-        for data, path in data_list:
-            for created_data, _ in self.created_data_list:
-                if data.name == created_data.name:
-                    self.message += " %s already created" % str(data.name)
-                else:
-                    self.created_data_list.append((data, path))
-    
-    def get_data(self):
-        """
-        Send list of available data
-        """
-        return self.loaded_data_list + self.created_data_list
-        
Index: guiframe/gui_manager.py
===================================================================
--- guiframe/gui_manager.py	(revision df23f902e66e295c8eefde39be011fa032cb4832)
+++ guiframe/gui_manager.py	(revision f444b20f1e24695fba634d38bf4839ddd05e95a6)
@@ -36,14 +36,16 @@
 
 import logging
-#from sans.guicomm.events import NewLoadedDataEvent
-from sans.guicomm.events import EVT_STATUS
-#from sans.guicomm.events import EVT_NEW_PLOT
-#from sans.guicomm.events import EVT_SLICER_PARS_UPDATE
-from sans.guicomm.events import EVT_ADD_MANY_DATA
-#from data_manager import DataManager
+
+from sans.guiframe.events import EVT_STATUS
+from sans.guiframe.events import EVT_ADD_MANY_DATA
+from sans.guiframe.events import StatusEvent
+from sans.guiframe.events import NewPlotEvent
+
 
 STATE_FILE_EXT = ['.inv', '.fitv', '.prv']
 
-
+DATA_MANAGER = False
+AUTO_PLOT = False
+AUTO_SET_DATA = True
 
 class ViewerFrame(wx.Frame):
@@ -51,5 +53,7 @@
     Main application frame
     """
-    def __init__(self, parent, id, title, window_height=300, window_width=300):
+    
+    def __init__(self, parent, id, title, 
+                 window_height=300, window_width=300):
         """
         Initialize the Frame object
@@ -81,4 +85,10 @@
         self.app_manager = None
         self._mgr = None
+        #data manager
+        from .data_manager import DataManager
+        self.data_manager = DataManager()
+        #add current perpsective
+        self._current_perspective = None
+        #file menu
         self.file_menu = None
         
@@ -104,5 +114,5 @@
         # Default locations
         self._default_save_location = os.getcwd()        
-
+        
         # Welcome panel
         self.defaultPanel = None
@@ -111,16 +121,4 @@
         # Check for update
         #self._check_update(None)
-        ## maximum number of opened files' paths to store
-        self.n_maxfileopen =  2
-        ## number of file open
-        self.n_fileOpen = 0
-        ## list of path of open files 
-        self.filePathList = []
-        ## list of open file with name form menu
-        #self._saveOpenData()
-        ## Dictionary of open file where keys are filename  and
-        # values are number of copy of data plotted
-        ## using the same loaded file 
-        self.indice_load_data = {}
         # Register the close event so it calls our own method
         wx.EVT_CLOSE(self, self._onClose)
@@ -188,5 +186,6 @@
         for item in self.plugins:
             if plugin.__class__ == item.__class__:
-                #print "Plugin %s already loaded" % plugin.__class__.__name__
+                msg = "Plugin %s already loaded" % plugin.__class__.__name__
+                logging.info(msg)
                 is_loaded = True    
         if not is_loaded:
@@ -227,6 +226,9 @@
                             module = imp.load_module( name, file, item, info)
                         if hasattr(module, "PLUGIN_ID"):
-                            try:
-                                plugins.append(module.Plugin())
+                            try: 
+                                plug = module.Plugin()
+                                if plug.set_default_perspective():
+                                    self._current_perspective = plug
+                                plugins.append(plug)
                                 msg = "Found plug-in: %s" % module.PLUGIN_ID
                                 logging.info(msg)
@@ -387,8 +389,7 @@
         for plugin in self.plugins:
             if len(plugin.populate_file_menu()) > 0:
-                
                 for item in plugin.populate_file_menu():
+                    id = wx.NewId()
                     m_name, m_hint, m_handler = item
-                    id = wx.NewId()
                     self.filemenu.Append(id, m_name, m_hint)
                     wx.EVT_MENU(self, id, m_handler)
@@ -407,6 +408,6 @@
         self._populate_file_menu()
         id = wx.NewId()
-        self.filemenu.Append(id, '&Save',
-                             'Save project as a SanaView (svs) file')
+        self.filemenu.Append(id, '&Save state into File',
+                             'Save project as a SansView (svs) file')
         wx.EVT_MENU(self, id, self._on_save)
         #self.filemenu.AppendSeparator()
@@ -600,5 +601,4 @@
             self._mgr.GetPane(self.panels["default"].window_name).IsShown():
             self.on_close_welcome_panel()
-        
             
     def _on_save(self, event):
@@ -697,5 +697,4 @@
         flag = self.quit_guiframe()
         if flag:
-            #import sys
             wx.Frame.Close(self)
             wx.Exit()
@@ -762,16 +761,4 @@
             dialog.ShowModal()            
             
-    def _onreloaFile(self, event):  
-        """
-        load a data previously opened 
-        """
-        from .data_loader import plot_data
-        for item in self.filePathList:
-            id, _, path, _ = item
-            if id == event.GetId():
-                if path and os.path.isfile(path):
-                    plot_data(self, path)
-                    break
-            
     def set_manager(self, manager):
         """
@@ -803,6 +790,7 @@
                 if item.set_default_perspective():
                     item.on_perspective(event=None)
+                    self._current_perspective = item
                     return 
-            
+        
     def set_perspective(self, panels):
         """
@@ -813,4 +801,5 @@
         :param panels: list of panels
         """
+       
         for item in self.panels:
             # Check whether this is a sticky panel
@@ -842,4 +831,41 @@
                 pass
         return path
+    
+    def add_data(self, data_list):
+        """
+        receive a list of data . store them its data manager if possible
+        determine if data was be plot of send to data perspectives
+        """
+        self.data_manager.add_data(data_list)
+        if AUTO_SET_DATA:
+            if self._current_perspective is not None:
+                try:
+                    self._current_perspective.set_data(data_list)
+                except:
+                    raise
+                    #msg = str(sys.exc_value)
+                    #wx.PostEvent(self, StatusEvent(status=msg,
+                    #                          info="error"))
+            else:
+                msg = "Guiframe does not have a current perspective"
+                logging.info(msg)
+        if DATA_MANAGER:
+            print "will show data panel"
+        if AUTO_PLOT:
+            self.plot_data(data_list)
+            
+    def plot_data(self, data_list):
+        """
+        send a list of data to plot
+        """
+        for new_plot in data_list:
+            wx.PostEvent(self, NewPlotEvent(plot=new_plot,
+                                                  title=str(new_plot.title)))
+            
+    def set_current_perspective(self, perspective):
+        """
+        set the current active perspective 
+        """
+        self._current_perspective = perspective
 
 class DefaultPanel(wx.Panel):
Index: guiframe/gui_style.py
===================================================================
--- guiframe/gui_style.py	(revision b7c7a1cf3a0885c7bb79804707fa30aa239ccdc5)
+++ guiframe/gui_style.py	(revision f444b20f1e24695fba634d38bf4839ddd05e95a6)
@@ -8,3 +8,2 @@
 DATAMANAGER = True
 
-DEFAUL_GUIFRAME = LOADING | PLOTTING|DATAMANAGER
Index: iframe/load_thread.py
===================================================================
--- guiframe/load_thread.py	(revision 32c0841e02d6c59dd5e7872fdba98ea9afb790b9)
+++ 	(revision )
@@ -1,58 +1,0 @@
-
-import time
-#import sys
-
-from data_util.calcthread import CalcThread
-from DataLoader.loader import Loader
-        
-
-class DataReader(CalcThread):
-    """
-    Load a data given a filename
-    """
-    def __init__(self, path, err_fct, msg_fct, parent=None,
-                 completefn=None,
-                 updatefn   = None,
-                 yieldtime  = 0.01,
-                 worktime   = 0.01
-                 ):
-        CalcThread.__init__(self, completefn,
-                 updatefn,
-                 yieldtime,
-                 worktime)
-        self.path = path
-        self.parent = parent
-        self.err_fct = err_fct
-        self.msg_fct = msg_fct
-        #Instantiate a loader 
-        self.loader = Loader()
-        self.starttime = 0  
-        
-    def isquit(self):
-        """
-        :raise KeyboardInterrupt: when the thread is interrupted
-        """
-        try:
-            CalcThread.isquit(self)
-        except KeyboardInterrupt:
-            raise KeyboardInterrupt   
-        
-        
-    def compute(self):
-        """
-        read some data
-        """
-        self.starttime = time.time()
-        try:
-            output =  self.loader.load(self.path)
-            #elapsed = time.time() - self.starttime
-            self.complete(output=output, parent=self.parent, path=self.path)
-        except RuntimeError:
-            self.err_fct()
-            self.msg_fct(parent=self.parent)
-            return
-        except:
-            self.msg_fct(parent=self.parent)
-            
-   
-      
Index: guiframe/local_perspectives/data_loader/data_loader.py
===================================================================
--- guiframe/local_perspectives/data_loader/data_loader.py	(revision b70caa1095787b58252925a57476af643cdc6810)
+++ guiframe/local_perspectives/data_loader/data_loader.py	(revision f444b20f1e24695fba634d38bf4839ddd05e95a6)
@@ -3,12 +3,62 @@
 plugin DataLoader responsible of loading data
 """
+import os
+import sys
+import wx
 
+from DataLoader.loader import Loader
+import DataLoader.data_info as DataInfo
 from sans.guiframe.plugin_base import PluginBase
+from sans.guiframe.events import StatusEvent
+from sans.guiframe.events import NewPlotEvent
+from sans.guiframe.dataFitting import Data1D
+from sans.guiframe.dataFitting import Data2D
+from sans.guiframe.utils import parse_name
+
+STATE_FILE_EXT = ['P(r) files (*.prv)|*.prv',
+                  'P(r) files (*.sav)|*.sav',
+                  'P(r) files (*.svs)|*.svs',
+                  'Fitting files (*.fitv)|*.fitv',
+                  'Fitting files (*.svs)|*.svs',
+                  'Invariant files (*.inv)|*.inv',
+                  'Invariant files (*.svs)|*.svs']
+EXTENSIONS = ['.svs', '.prv', '.inv', '.fitv']
 
 class Plugin(PluginBase):
     
     def __init__(self, standalone=False):
-        PluginBase.__init__(self, name="DataLaoder", standalone=standalone)
-        
+        PluginBase.__init__(self, name="DataLoader", standalone=standalone)
+        #Default location
+        self._default_save_location = None  
+        self.data_name_dict = {}
+        self.loader = Loader()   
+        
+    def populate_menu(self, id, owner):
+        """
+        Create a menu for the Data plug-in
+        
+        :param id: id to create a menu
+        :param owner: owner of menu
+        
+        :return: list of information to populate the main menu
+        
+        """
+        #Menu for data loader
+        self.menu = wx.Menu()
+        #menu for data files
+        data_file_id = wx.NewId()
+        data_file_hint = "load one or more data in the application"
+        self.menu.Append(data_file_id, 
+                         '&Load Data File(s)', data_file_hint)
+        wx.EVT_MENU(owner, data_file_id, self._load_data)
+        #menu for data from folder
+        data_folder_id = wx.NewId()
+        data_folder_hint = "load multiple data in the application"
+        self.menu.Append(data_folder_id, 
+                         '&Load Data Folder', data_folder_hint)
+        wx.EVT_MENU(owner, data_folder_id, self._load_folder)
+        #create  menubar items
+        return [(id, self.menu, "Data")]
+    
     def populate_file_menu(self):
         """
@@ -16,18 +66,260 @@
         add load file menu item and load folder item
         """
-        hint_load_folder = "Read file(s) from a folder and load"
-        hint_load_folder += " them into the application"
-        hint_load_file = "Read files and load them into the application"
-        return [["Load File", hint_load_file, self.parent._on_open]]
-                 #["Load File", hint_load_file, self._load_file],
-                #["Load Folder", hint_load_folder ,self._load_folder]]
+        
+        hint_load_file = "Read state's files and load them into the application"
+        return [["Open State from File", hint_load_file, self._load_file]]
   
+    def _load_data(self, event):
+        """
+        Load data
+        """
+        flag = True
+        file_list = self.choose_data_file(flag)
+        if not file_list or file_list[0] is None:
+            return
+        self.get_data(file_list, flag=flag)
+        
     def _load_file(self, event):
         """
-        Load file(s)
-        """
+        Load  sansview defined files
+        """
+        flag = False
+        file_list = self.choose_data_file(flag)
+        if not file_list or file_list[0] is None:
+            return
+        self.get_data(file_list, flag=flag)
+       
     def _load_folder(self, event):
         """
         Load entire folder
         """
-        
+        flag = True
+        path = self.choose_data_folder(flag)
+        if path is None:
+            return
+        file_list = self.get_file_path(path)
+        self.get_data(file_list, flag=flag)
+    
+    def get_wild_card(self, flag=True):
+        """
+        :param flag: is True load only data file, else load state file
+         return wild cards
+        """
+        if flag:
+            cards = self.loader.get_wildcards()
+            for item in STATE_FILE_EXT:
+                if item in cards:
+                    cards.remove(item)
+        else:
+            cards = STATE_FILE_EXT
+        return '|'.join(cards)
+        
+        
+    def choose_data_file(self, flag=True):
+        """
+        Open the file dialog to load file(s)
+        """
+        path = None
+        if self._default_save_location == None:
+            self._default_save_location = os.getcwd()
+        
+        cards = self.loader.get_wildcards()
+        wlist = self.get_wild_card(flag)
+        if flag:
+            style = wx.OPEN|wx.FD_MULTIPLE
+        else:
+            style = wx.OPEN|wx.FD_DEFAULT_STYLE
+            
+        dlg = wx.FileDialog(self.parent, 
+                            "Choose a file", 
+                            self._default_save_location, "",
+                             wlist,
+                             style=style)
+        if dlg.ShowModal() == wx.ID_OK:
+            path = dlg.GetPaths()
+            if len(path) >= 0 and not(path[0]is None):
+                self._default_save_location = os.path.dirname(path[0])
+        dlg.Destroy()
+        return path
+    
+    def choose_data_folder(self, flag=True):
+        """
+        :param flag: is True load only data file, else load state file
+        return a list of folder to read
+        """
+        path = None
+        if self._default_save_location == None:
+            self._default_save_location = os.getcwd()
+        
+        wlist = self.get_wild_card(flag)
+        
+        dlg = wx.DirDialog(self.parent, "Choose a directory", 
+                           self._default_save_location,
+                            style=wx.DD_DEFAULT_STYLE)
+        if dlg.ShowModal() == wx.ID_OK:
+            path = dlg.GetPath()
+            self._default_save_location = path
+        dlg.Destroy()
+        return path
+    
+    def load_error(self, error=None):
+        """
+        Pop up an error message.
+        
+        :param error: details error message to be displayed
+        """
+        message = "The data file you selected could not be loaded.\n"
+        message += "Make sure the content of your file"
+        message += " is properly formatted.\n\n"
+        
+        if error is not None:
+            message += "When contacting the DANSE team, mention the"
+            message += " following:\n%s" % str(error)
+        dial = wx.MessageDialog(self.parent, message, 'Error Loading File',
+                                wx.OK | wx.ICON_EXCLAMATION)
+        dial.ShowModal()  
+        
+    def get_file_path(self, path):
+        """
+        Receive a list containing folder then return a list of file
+        """
+        if os.path.isdir(path):
+            return [os.path.join(os.path.abspath(path),
+                                  file) for file in os.listdir(path)]
+    
+    def get_data(self, path, format=None, flag=True):
+        """
+        """
+        message = ""
+        output = []
+        error_message = ""
+        for p_file in path:
+            basename  = os.path.basename(p_file)
+            root, extension = os.path.splitext(basename)
+            if flag:
+                if extension.lower() in EXTENSIONS:
+                    error_message = "Cannot load: %s\n" % str(p_file)
+                    error_message += "Try File -> open ...."
+                    continue
+            else:
+                if extension.lower() not in EXTENSIONS:
+                    error_message = "Cannot load: %s\n" % str(p_file)
+                    error_message += "Try Data -> Load ...."
+                    continue
+            try:
+                temp =  self.loader.load(p_file)
+                if temp.__class__.__name__ == "list":
+                    for item in temp:
+                        data = self.create_data(item, p_file)
+                        output.append(data)
+                else:
+                    data = self.create_data(temp, p_file)
+                    output.append(data)
+                message = "Loading ..." + str(p_file) + "\n"
+                self.load_update(output=output, message=message)
+            except:
+                error_message = "Error while loading: %s\n" % str(p_file)
+                error_message += str(sys.exc_value) + "\n"
+                self.load_update(output=output, message=error_message)
+                
+        message = "Loading Complete!"
+        self.load_complete(output=output, error_message=error_message,
+                       message=message, path=path)
+            
+   
+    def old_get_data(self, path, format=None, flag=True):
+        """
+        :param flag: is True load only data file, else load state file
+        Receive a list of file paths and return a list of Data objects
+        """
+        from .load_thread import DataReader
+        message = "Start Loading \n"
+        wx.PostEvent(self.parent, StatusEvent(status=message,
+                                              info="info", type="progress"))
+        calc_load = DataReader(loader=self.loader,
+                               path=path,
+                               flag=flag,
+                               transform_data=self.create_data,
+                               updatefn=self.load_update,
+                               completefn=self.load_complete)
+        calc_load.queue()
+        
+    def load_update(self, output=None, message=""):
+        """
+        print update on the status bar
+        """
+        if message != "":
+            wx.PostEvent(self.parent, StatusEvent(status=message,
+                                                  type="progress",
+                                                   info="warning"))
+        
+    def load_complete(self, output, message="", error_message="", path=None):
+        """
+         post message to  status bar and return list of data
+        """
+        wx.PostEvent(self.parent, StatusEvent(status=message,
+                                              info="warning",
+                                              type="stop"))
+        self.parent.add_data(output)
+        if error_message != "":
+            self.load_error(error_message)
+            
+    def create_data(self, data, path):
+        """
+        Receive data from loader and create a data to use for guiframe
+        """
+        
+        if issubclass(DataInfo.Data2D, data.__class__):
+            new_plot = Data2D(image=None, err_image=None) 
+        else: 
+            new_plot = Data1D(x=[], y=[], dx=None, dy=None)
+           
+        new_plot.copy_from_datainfo(data) 
+        data.clone_without_data(clone=new_plot)  
+        #creating a name for data
+        name = ""
+        title = ""
+        file_name = ""
+        if path is not None:
+            file_name = os.path.basename(path)
+        if data.run:
+            name = data.run[0]
+        if name == "":
+            name = file_name
+        ## name of the data allow to differentiate data when plotted
+        name = parse_name(name=name, expression="_")
+        
+        max_char = name.find("[")
+        if max_char < 0:
+            max_char = len(name)
+        name = name[0:max_char]
+        
+        if name not in self.data_name_dict:
+            self.data_name_dict[name] = 0
+        else:
+            self.data_name_dict[name] += 1
+            name = name + " [" + str(self.data_name_dict[name]) + "]"
+        #find title
+        if data.title.strip():
+            title = data.title
+        if title.strip() == "":
+            title = file_name
+        
+        if new_plot.filename.strip() == "":
+            new_plot.filename = file_name
+        
+        new_plot.name = name
+        new_plot.title = title
+        ## allow to highlight data when plotted
+        new_plot.interactive = True
+        ## when 2 data have the same id override the 1 st plotted
+        new_plot.id = name
+        ##group_id specify on which panel to plot this data
+        new_plot.group_id = name
+        new_plot.is_data = True
+        new_plot.path = path
+        ##post data to plot
+        # plot data
+        return new_plot
+        
+       
Index: guiframe/local_perspectives/data_loader/load_thread.py
===================================================================
--- guiframe/local_perspectives/data_loader/load_thread.py	(revision b70caa1095787b58252925a57476af643cdc6810)
+++ guiframe/local_perspectives/data_loader/load_thread.py	(revision f444b20f1e24695fba634d38bf4839ddd05e95a6)
@@ -2,8 +2,10 @@
 import time
 import sys
+import os
 
 from data_util.calcthread import CalcThread
 
         
+EXTENSIONS = ['.svs', '.prv', '.inv', '.fitv']
 
 class DataReader(CalcThread):
@@ -12,4 +14,6 @@
     """
     def __init__(self, path, loader,
+                 flag=True,
+                 transform_data=None,
                  completefn=None,
                  updatefn   = None,
@@ -21,4 +25,6 @@
                  yieldtime,
                  worktime)
+        self.load_state_flag = flag
+        self.transform_data = transform_data
         self.list_path = path
         #Instantiate a loader 
@@ -46,11 +52,22 @@
         error_message = ""
         for path in self.list_path:
+            basename  = os.path.basename(path)
+            root, extension = os.path.splitext(basename)
+            if self.load_state_flag:
+                if extension.lower() in EXTENSIONS:
+                    pass
+            else:
+                if extension.lower() not in EXTENSIONS:
+                    pass
             try:
                 temp =  self.loader.load(path)
                 elapsed = time.time() - self.starttime
                 if temp.__class__.__name__ == "list":
-                    output += temp
+                    for item in temp:
+                        data = self.transform_data(item, path)
+                        output.append(data)
                 else:
-                    output.append(temp)
+                    data = self.transform_data(temp, path)
+                    output.append(data)
                 message = "Loading ..." + str(path) + "\n"
                 if self.updatefn is not None:
Index: guiframe/local_perspectives/plotting/plotting.py
===================================================================
--- guiframe/local_perspectives/plotting/plotting.py	(revision b7c7a1cf3a0885c7bb79804707fa30aa239ccdc5)
+++ guiframe/local_perspectives/plotting/plotting.py	(revision f444b20f1e24695fba634d38bf4839ddd05e95a6)
@@ -14,6 +14,6 @@
 import wx
 import sys
-from sans.guicomm.events import EVT_NEW_PLOT
-from sans.guicomm.events import StatusEvent 
+from sans.guiframe.events import EVT_NEW_PLOT
+from sans.guiframe.events import StatusEvent 
 
 from sans.guiframe.plugin_base import PluginBase
Index: guiframe/plugin_base.py
===================================================================
--- guiframe/plugin_base.py	(revision b7c7a1cf3a0885c7bb79804707fa30aa239ccdc5)
+++ guiframe/plugin_base.py	(revision f444b20f1e24695fba634d38bf4839ddd05e95a6)
@@ -144,4 +144,5 @@
         
         """
+        self.parent.set_current_perspective(self)
         self.parent.set_perspective(self.perspective)
     
@@ -159,3 +160,10 @@
        default perspective setting
         """
+        if self.standalone:
+            return True
         return False
+    
+    def set_data(self, data_list):
+        """
+        receive a list of data and use it in the current perspective
+        """
Index: guiframe/setup.py
===================================================================
--- guiframe/setup.py	(revision 8db3904e6917e7b22fc28114d207a91e4fc536bc)
+++ guiframe/setup.py	(revision f444b20f1e24695fba634d38bf4839ddd05e95a6)
@@ -9,5 +9,6 @@
 import os
 import sys
-
+if len(sys.argv) == 1:
+    sys.argv.append('install') 
     
 path = os.path.join(os.getcwd(), 'local_perspectives')
Index: guiframe/statusbar.py
===================================================================
--- guiframe/statusbar.py	(revision b5ca22392a8b926450a207ca7fb9c9bf296558e2)
+++ guiframe/statusbar.py	(revision f444b20f1e24695fba634d38bf4839ddd05e95a6)
@@ -1,7 +1,6 @@
 import wx
 from wx import StatusBar as wxStatusB
-import wx.lib
-#from wx.lib import newevent
-(MessageEvent, EVT_MESSAGE) = wx.lib.newevent.NewEvent()
+from wx.lib import newevent
+(MessageEvent, EVT_MESSAGE) = newevent.NewEvent()
 #numner of fields of the status bar 
 NB_FIELDS = 4
@@ -254,5 +253,5 @@
         if type.lower() == "progress":
             self.nb_progress += 1
-            self.timer.Start(0)
+            self.timer.Start(1)
             self.gauge.Pulse()
         if type.lower() == "update":
Index: guiframe/utils.py
===================================================================
--- guiframe/utils.py	(revision 32c0841e02d6c59dd5e7872fdba98ea9afb790b9)
+++ guiframe/utils.py	(revision f444b20f1e24695fba634d38bf4839ddd05e95a6)
@@ -5,4 +5,15 @@
 import re
 
+def parse_name(name, expression):
+    """
+    remove "_" in front of a name
+    """
+    if re.match(expression, name) is not None:
+        word = re.split(expression, name, 1)
+        for item in word:           
+            if item.lstrip().rstrip() != '':
+                return item
+    else:
+        return name
 def format_number(value, high=False):
     """
