in reply to global class data
Observer class - contains a method that gets run whenever your class is modifieid
addListener() - put this in your class above, so you can add an observer object. add to a list of listeners.
removeListener() - keep memory costs down over long running programs... deregister a listener
notifyListeners() - iterates over your list of listeners running the method in your observer class type. you'd put a call to this in any method that modifies your "class above"'s data.
Hope this hepls.
|
|---|