Hey all,
I think that the current WValidator::fixup(WString& input) is not very
useful.
Suppose I've reimplemented WValidator::validate(WString& input) const (note,
WString& input, not const WString& input) and after the validation (after
the requesting the database, for example) I want to fix the users input
and I already know how to do it.
Because the WValidator::validate() declared as const, I can't save the
right input in a class variable (or I need to declare it as mutable). Also,
I can't let the fixup() to know about right input. So, because of argument
of
validate() is not const, I can to modify the input. So, I don't need
fixup()...
Summary, I think that the WValidator::fixup() will be more useful with
two arguments instead of one:
virtual void fixup(WString& input, const WString& fixed) const;
Regards,
Dmitriy
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest