Northwoods.GoWeb Assembly > Northwoods.GoWeb Namespace > GoObject Class : AddObserver Method |
Adding an observer object means that that observer's OnObservedChanged method will be called whenever this object is changed. If the obj is already an observer for this object, this call does nothing. CopyObject will not copy the list of observers for this object; the caller of CopyObject is responsible for doing so, just as with adding the copied object to a layer and/or group to update the Layer and Parent properties.
Use of the observer mechanism is less efficient in both space and time than overriding the Changed method of the observed object's class. However it can be useful when it is inconvenient to implement such an override.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2