John Darrington <[email protected]> writes: > For a while, I've been unhappy about the way the GUI makes use of > dictionary.c > > Currently, we have an object called PsppireDict which contains a > pointer to a (struct dictionary) which is created externally. In > order that PsppireDict is aware of changes made to to (struct > dictionary), the latter has a set of callbacks to which the containing > PsppireDict connects. Further, the (struct dictionary) can be > destroyed, whilst the PsppireDict survives. Typically, this happens > on each procedure - the old dictionary is destroyed and a new one > created in its stead. The gui has to anticipate this, and reload the > new dict, and it emits a "backend-changed" signal. All of this is > really messy, and is beginning to make the GUI unmaintainable.
The one thing that would worry me about making dictionary a "virtual class" is that it would, I think, be a very broad class. That is, it would have quite a large number of member functions. The cleanest and most beneficial virtual classes, in my experience, are those that encapsulate complex behavior behind a very simple interface. I think that the casereaders are a good example, actually. If you want to take a stab at re-implementation in this form, though, then I'd be happy to take a look at the result. I've been surprised before when you have shown that changes that I thought would be difficult or awful were really not so bad. -- Ben Pfaff http://benpfaff.org _______________________________________________ pspp-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/pspp-dev
