This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: fireing property changes


Cedric Berger writes:
 
>Hi Michael,
>
>I'm just browsing the java-patches list archive, and I just found the
>following patch:
>
>http://gcc.gnu.org/ml/java-patches/2004-q3/msg00148.html <http://gcc.gnu.org/ml/java-patches/2004-q3/msg00148.html> 
>
>I've just one remark on the change, and on the code just before too:
>
>+  public void setTabSize(int newSize)
>+  {
>+    firePropertyChange("tabSize", tabSize, newSize);
>+    tabSize = newSize;
>+  }
>
>I think the "firePropertyChange" should occur after the "tabSize = newSize"
>statement, so code executing in the handlers have access to up-to-date
>information. something like: ...

The JavaBeans API Specification 1.01 section 7.4.1 requires that this be so.  It is neither optional nor unspecified behavior.
 
David Daney.
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]