Geert Janssens <janssens-ge...@telenet.be> writes: > I don't have much experience with how this is done in general. It > seems to me though that's a matter of defining the API's well. > > The GUI is supposed to know if some fields have to be > validated. There's no way around this. But the GUI code doesn't have > to know what the validation entails exactly. The core engine on the > other hand does know exactly what is allowed for a given object and > what isn't. The key is that the core engine should make some functions > available for testing this, returning in the most simple case a yes/no > reply (value is valid for object or not). In a more advanced set up it > can also return a message that can be displayed to the user to explain > why the input isn't valid. > > These functions are part of the core engine API and don't need to use > any GUI framework related toolkit (like Qt, Glib, Gtk, WxWidgets > stuff). We could keep the signal and the slots both in the GUI code, > with the slots calling into the engine functions to do the real work. > > Did I understand this correctly ?
That's how it should work, IMHO, yes. However that's not how it currently works, and I suspect it might be a lot of work to convert GnuCash code over to that way to doing things.. > Geert -derek -- Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory Member, MIT Student Information Processing Board (SIPB) URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH warl...@mit.edu PGP key available _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel