On Thursday 05 April 2001 07:31, Allan Rae wrote:
> On Tue, 3 Apr 2001, Allan Rae wrote:
> 
> > On Mon, 2 Apr 2001, Angus Leeming wrote:
> > > > 7) I find it a bit weird that I call a method "valid(bool)" whenever
> > > > e.g. a user types another character in a line edit widget. Can we
> > > > add another method mutated(bool) or changed(bool) possibly ?
> > > > This would make at least the KDE frontend code a lot clearer IMHO
> >
> > There's more than simply "changed/unchanged".  valid() should only be
> > called when a change has happened.  So it represents "valid
> > changed/invalid changed".   You are also free to call bc.input(SMInput)
> > directly.
> 
> BTW, what happens if after the user presses a key they then try to press
> Okay?  If the last key press in the edit box gave an invalid entry then
> they shouldn't have an Okay button available.

I've been thinking about (note no intention of implementing!) invalid input.

When data is input to the button controller as invalid, why not then store a 
pointer to that widget in a vector of invalid data. Future input is checked 
against this vector and any (was invalid, now valid) data is removed from it. 
The dialog can then only be activated when all input is valid.

Just a thought.

Angus

Reply via email to