Opened 11 years ago

Closed 11 years ago

#15 closed defect (fixed)

default values of spectral processing options hardcoded in wxglade

Reported by: flip Owned by: flip
Priority: major Milestone:
Component: processing Version:
Keywords: Cc:

Description

The values that appear by default in the controls in the spectral processing options are hardcoded in the wxglade (.wxg) files. WxGlade generates .py files from the .wxg files and those .py files are the source for the values in our application, but the .wxg files are the true source.

This is bad for several reasons.

First, if anyone wants to change a value they have to do so in wxGlade and then regenerate the associated .py file. Needless to say, this requires that they have wxGlade installed in the first place.

Second, it means we can't define these values as constants anywhere since wxGlade doesn't know about our library of constants when it runs.

Third, we're developing a convention of specifying and documenting initial values in a .py file that we wrote (currently vespa_data.py). Regardless of what we set those values to, they get overwritten by the values in the wxGlade files.

Fourth, Brian has mentioned the idea of changing PyVespa to allow the user to have many data files loaded at once with just two visible in the processing mode. In that scenario, a user could load data file A, alter some spectral processing options, put A in the background while doing something else and then return to A. Obviously the controls would have to reflect the values that the user entered when initially futzing with A.

The solution is to subtract wxGlade from the equation. It should leave the controls empty, and we'll add a little code that executes when a new data file/object is loaded that populates the controls based on the values in the vespa_data object.

Change History (2)

comment:1 Changed 11 years ago by flip

This might also be a good time to attack ticket:2

comment:2 Changed 11 years ago by flip

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r198

Note: See TracTickets for help on using tickets.