From Jonathan de Boyne Polla · 1996-04-02 06:47 · #73530 in EMULATE
KH>
> My problem is that once I have the input, how should I pass
> it along to a file? To have the TEntryWindow handle the
> file IO seems improper... How would y'all out there design
> an OOP data entry system??
KH>
Model/View is a good paradigm to steal.
Simply put, your window class is the `view' of an underlying data
structure, which is the `model'. Each instance of the view refers to an
model instance, which it uses to populate its fields and so forth.
However, it is the model that is saved to and from persistent storage.
Incidentally, you can tell when someone has used a model/view paradigm.
Every dialogue has an "undo" button. (-:
( This is because "undo" is trivial to implement in this paradigm.
Whenever the button is pressed, you simply invoke the view's
"repopulate" function. )
> JdeBP <
___
X MegaMail 2.10 #0:
--- Maximus/2 3.01
* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4)