Many Similar Dialogs For Date Entry

Rich Shepard rshepard at appl-ecosys.com
Thu Feb 1 15:59:36 PST 2007


   Rather than re-inventing the wheel, and having it out of round, I'd
appreciate your suggestions on how to optimally organize wxPython code when
different but similar types of data must be entered by the user.

   On one notebook page, a variable number of named mathematical curves need
to be defined. There are 18 curve types: 'Empty', 'Linear Increasing',
'Linear Decreasing', 'Growth S-Curve', 'Decay S-curve', 'Gaussian',
'Triangle', 'Left shoulder', 'Right shoulder', 'Trapezoid', 'Outcome
(Aggregated)', 'Singleton', 'Data', 'Beta', 'Transform', 'Truth series',
'Weighted beta', and 'Rectangle.' In addition to the name and shape, each
type has relevant data necessary to define it. Data types include the domain
ends, width, center, height, inflection point, direction (for the S-curves
and shouldered trapezoids), and so on.

   Creating 18 classes, each slightly different from the others is inelegant
and prone to be a maintenance nightmare. I suppose that one base class with
the others inheriting from it might work, but I've not written anything like
this in my short exposure to wxPython.

   I would appreciate advice and pointers to relevant examples or guidelines.
I did not see an obvious answer in the wPIA book.

Rich

-- 
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.        |          Accelerator(TM)
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863




More information about the wxpython-users mailing list