On Thu, Oct 04, 2012 at 06:55:08PM +0900, Tristan Van Berkom wrote: > I'm curious about this, out of my own personal interest... do we > have a workable solution for this "commit-on-focus-out" paradigm ? > > As I understand, it's not very stable to use focus-out events > and, I recall reading a detailed blog about this I can't seem to > find at the moment (but it seems the problem is not at all limited > to GTK+, just broken by design). > > Note in many cases validation/apply/commit user input on > focus-out does work but... here is a case where I expect it > to break: > > ...
Validation is a different problem. For validation, the user should have an instataneous visual clue whether the input would be considered valid (but no blocking of non-conforming inputs, of course). In the second case you mentioned, loading of new values must not happen when there are uncommited changes and that should be also easy to achieve – except it may come a bit too late from the user's perspective if validation needs also be performed. However, if the GUI is constructed so that the user expects immediate commit, as it seems from your description, then it should be probably really immediate. Imagine the case I was talking about as function plotting. You may attempt to plot the function as the user types the expression but (1) the ‘plotting’ thing is not something really instanteneous and so doing it after each keystroke would interfere with typing (2) the user is essentially never interested in displaying the intermediate rubbish, in fact, he may be strongly intereseted in seeing the last meaningful, i.e. commited, output while editing. Yeti _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list