erratum on Duplicate Observed Data example
Andrew Luo <[email protected]> Sat, 21 Jul 2012 08:23:43 -0700 (PDT)
| Newsgroups | gmane.comp.programming.refactoring |
|---|---|
| Message-ID | <[email protected]> |
in the method EndField_FocusLost, setEnd is called before the integer valid=
ation, it should be called after:
if (isNotInteger(_endField.getText())) {
=A0=A0=A0 setEnd("0");
} else {
=A0=A0=A0 setEnd(_endField.getText());
}
Or this check could be moved into the observable's setter, since the intege=
r requirement is really a constraint of the domain.
the reasoning is that if there are other observers in the system, then they=
could be updated with transient invalid values. Is this analysis correct?
Thanks for the great book,
Andrew
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/refactoring/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/refactoring/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]=20
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/