Skip to main content

[FYI] Subtle issues with property change notification and deprecation ...

No replies
Anonymous

After some intense head-scratching (my live rollover example using a
taskPane mysteriously stopped working) I had that deja-vue: the reason
was a subtle error introduced during refactoring/deprecation of expanded
vs. collapsed - similar to what I introduced into the calendar widgets
when switching from long to Date ;-)

The context: one property is replaced with a similar property (in
JXMonthView f.i. the old was firstDisplayedDate of type long and the new
firstDisplayedDay of type Date).

The error: fire a change of the old property in the old (deprecated)
method only. Then listeners to the old property name will not get
notified if the new property is changed.

The solution: fire events for both the old an new property in _both_
setters.

Posted here (besides filing #835) just to raise the awareness of what
seems to be a general trap.

CU
Jeanette

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net