In my latest push to the master branch, I’ve added a feature update from
Sebastian Koslowksi for GRC. Previously, every change to an edit box in
GRC Properties box would cause GRC to reevaluate the entire application
tell you if your entry was right or wrong. If wrong, it would show up
immediately in red and turn black when it was correct.
This seems fine, but I’ve run into two major issues with that behavior.
First, certain changes would cause errors that would change the focus in
the dialog box. So you would then have to re-click the edit box to enter
what you wanted to in the first place. The second problem was that you
could find yourself in the midst of typing a Python function, like, say,
editing a filter definition, that would incur a huge calculation only
because you weren’t finished typing. GRC immediately tries to run the
calculation and causes everything to freeze. Both very annoying when
happen to you.
Sebastian’s tweak is to change from on-change to remove-focus.
now, when you edit a field, the field label turns blue to indicate a
change, but it doesn’t try to run anything until you’ve removed the
by tabbing to or clicking on another box in the properties list. It then
evaluates it and produces any error messages.
I personally like this new method a lot. The downside is that if you
paying attention, you might enter the wrong thing and hit ok or enter
to find out then that you made an error and will have to reopen the
properties box to fix it. I see the upside to this behavior as
to this downside. But I think that Sebastian and I would appreciate
thoughts on this or alternative ways to handle things.