← Back to team overview

anewt-developers team mailing list archive

[Bug 319966] Re: AnewtFormControlChoice ensuring selection

 

No, I have not changed this behavior, but I do believe the fix is quite
simple now: just remove the call to
AnewtFormControlChoice::_ensure_selection() in
AnewtFormControlChoice::set_value(). This way an invalid option will
result in no valid option being selected. AnewtFormControl::is_valid()
will then set the error to 'Invalid value' and return false.

If you want the fallback behavior you'll have to call
_ensure_selection() manually, so maybe the underscore should be removed
and it should no longer be marked as private.

-- 
AnewtFormControlChoice ensuring selection
https://bugs.launchpad.net/bugs/319966
You received this bug notification because you are a member of Anewt
developers, which is subscribed to Anewt.