Menu

#110 property change listeners

open
nobody
2
2010-03-09
2010-03-09
No

We use property change listeners all over the place for handling events like an OK button being pressed. We have inconsistent change keys "data_changed" versus "comment_changed" versus "howto_changed" etc., and should probably define a static set of keys somewhere. We could define a set of properties like PROPERTY_DATA_CHANGED, PROPERTY_CANCELLED, PROPERTY_COMMIT_DATA, and so on and so forth (not necessarily those keys, but something like it).

I'd also love to come up with a consistent way of handling property changes. Maybe define a class that encapsulates the xmlobject being altered during the property change so that properties change listeners behave like they were meant to rather than always being fired because we use true and false for the old/new values. This encapsulating class would then be used in the firePropertyChange(key, _OLDVALUE_, _NEWVALUE_) call for the old/new values.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.