Changeset e7b1ccf in sasview for sansview/perspectives/fitting
- Timestamp:
- Jul 6, 2009 12:03:08 PM (15 years ago)
- 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:
- 4331b05e
- Parents:
- ceb89ac
- Location:
- sansview/perspectives/fitting
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
r3b9e023 re7b1ccf 12 12 (PreviousStateEvent, EVT_PREVIOUS_STATE) = wx.lib.newevent.NewEvent() 13 13 (NextStateEvent, EVT_NEXT_STATE) = wx.lib.newevent.NewEvent() 14 _BOX_WIDTH = 8014 _BOX_WIDTH = 76 15 15 16 16 class BasicPage(wx.ScrolledWindow): -
sansview/perspectives/fitting/modelpage.py
r3b9e023 re7b1ccf 10 10 from sans.guiframe.utils import format_number 11 11 (ModelEventbox, EVT_MODEL_BOX) = wx.lib.newevent.NewEvent() 12 _BOX_WIDTH = 8012 _BOX_WIDTH = 76 13 13 14 14 import basepage -
sansview/perspectives/fitting/models.py
r7a69683 re7b1ccf 1 1 #TODO: add comments to document this module 2 2 #TODO: clean-up the exception handling. 3 #TODO: clean-up existing comments/documentation. 4 # For example, the _getModelList method advertises 5 # an 'id' parameter that is not part of the method's signature. 6 # It also advertises an ID as return value but it always returns zero. 3 7 4 #TODO: clean-up the FractalAbsModel and PowerLawAbsModel menu items. Those 8 5 # model definitions do not belong here. They belong with the rest of the … … 16 13 17 14 (ModelEvent, EVT_MODEL) = wx.lib.newevent.NewEvent() 18 15 from sans.guicomm.events import StatusEvent 19 16 # Time is needed by the log method 20 17 import time … … 114 111 List of models we want to make available by default 115 112 for this application 116 117 @param id: first event ID to register the menu events with 113 118 114 @return: the next free event ID following the new menu events 119 115 """ … … 287 283 if len(list1)>0: 288 284 self.model_combobox.set_list(menuinfo[0],list1) 289 285 290 286 for item in list1: 291 id = wx.NewId() 292 struct_factor=item() 293 struct_name = struct_factor.__class__.__name__ 294 if hasattr(struct_factor, "name"): 295 struct_name = struct_factor.name 296 297 menuinfo[1].Append(int(id),struct_name,struct_name) 298 if not item in self.struct_factor_dict.itervalues(): 299 self.struct_factor_dict[str(id)]= item 300 wx.EVT_MENU(self.event_owner, int(id), self._on_model) 287 try: 288 id = wx.NewId() 289 struct_factor=item() 290 struct_name = struct_factor.__class__.__name__ 291 if hasattr(struct_factor, "name"): 292 struct_name = struct_factor.name 293 294 menuinfo[1].Append(int(id),struct_name,struct_name) 295 if not item in self.struct_factor_dict.itervalues(): 296 self.struct_factor_dict[str(id)]= item 297 wx.EVT_MENU(self.event_owner, int(id), self._on_model) 298 except: 299 msg= "Error Occured: %s"%sys.exc_value 300 wx.PostEvent(self.event_owner, StatusEvent(status=msg)) 301 301 302 302 id = wx.NewId()
Note: See TracChangeset
for help on using the changeset viewer.