Beyond 2.6

Derek Atkins warlord at MIT.EDU
Thu Feb 14 13:43:19 EST 2013

Christian Stimming <christian at> writes:

> Am Mittwoch, 13. Februar 2013, 13:07:55 schrieb Derek Atkins:
>> John Ralls <jralls at> writes:
>> >>> What do you mean by "real-time validation of inputs"?
>> >> 
>> >> I mean, e.g, making sure an Account has a name entry, and that it's
>> >> unique, and that the account type is valid based on the parent.. 
>> >> Those
>> >> kinds of input validation that's currently done in the dialog.
>> > 
>> > Those checks should be part of the Account constructor, and would
>> > throw exceptions. The interface code between the engine and Gtk+ would
>> > convert those exceptions into GErrors for the dialog box to handle;
>> > C++-based UI frameworks would be able to catch the exceptions
>> > directly.
>> Except by the time you're processing it's too late.  It would be nicer
>> to make the "OK" box grey until the dialog is properly filled in, to
>> provide validation of inputs even sooner to the user.  But that implies
>> some way to push the validation requirements into the GUI.
> Absolutely. The constraints are needed on several levels. Of course
> constraints in the lower data layer (or database layer) are needed to
> enable unittesting and consistency there. But as the goal is a
> user-centric application, the constraints must be communicated to the
> user in a way that makes it easy for him/her to understand those
> constraints. At the end of the day, this means the GUI must contain
> the knowledge about those constraints just as well as the data
> layer. A question of what we're doing this for, after all.

Right.  It would be nice if there were some way to abstract out those
constraints in a way that both the "model" and the "view" (and arguably
the "controller") can share the validations.  I'm not sure how this can
best be done or implemented, tho.

> Regards,
> Christian


       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL:    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available

More information about the gnucash-devel mailing list