Changeset 1fbb343 in sasview


Ignore:
Timestamp:
Mar 5, 2009 10:26:29 PM (16 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
76dab10
Parents:
07a93a1
Message:

sansview: change data member to circumvent a problem with a badly written inheritence

Location:
sansview/perspectives/fitting
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/fitpage1D.py

    r07a93a1 r1fbb343  
    1515#TODO: FitPage1D inherits from ModelPage but doesn't call its __init__ method! 
    1616#TODO: refactor this class to have an __init__ that deals with data only, then calls a UI builder method. 
     17 
    1718class FitPage1D(ModelPage): 
    1819    """ 
     
    4142        #fit page manager  
    4243        self.manager = None 
    43          
    44          
    45         # Should not have to write the following line if the inheritance 
    46         # was coded properly... 
    47         #TODO: get rid of this line once the class is refactored 
    48         self._disp_obj_dict = {} 
    49          
    50          
    5144        #Store the parent of this panel parent 
    5245        # For this application fitpanel is the parent 
  • sansview/perspectives/fitting/modelpage.py

    r07a93a1 r1fbb343  
    2828    window_caption = "Fit Page" 
    2929    name="" 
     30     
     31    ## Data member to store the dispersion object created 
     32    _disp_obj_dict = {} 
     33     
    3034    def __init__(self, parent,model,name, *args, **kwargs): 
    3135        wx.ScrolledWindow.__init__(self, parent, *args, **kwargs) 
     
    3539        # model on which the fit would be performed 
    3640        self.model=model 
    37         # Data member to store the dispersion object created 
    38         self._disp_obj_dict = {} 
     41         
    3942        #list of dispersion paramaters 
    4043        self.disp_list=[] 
     
    348351                if str(v)=="MyModel": 
    349352                                # Remove the option until the rest of the code is ready for it 
    350                     #self.disp_box.Insert("Select customized Model",id) 
     353                    self.disp_box.Insert("Select customized Model",id) 
    351354                    pass   
    352355                else: 
Note: See TracChangeset for help on using the changeset viewer.