GoDiagram Win Reference
AddObserver Method

Register an object as an observer of changes to this object.
Syntax
'Declaration
 
Public Overridable Sub AddObserver( _
   ByVal obj As GoObject _
) 
public virtual void AddObserver( 
   GoObject obj
)

Parameters

obj
Remarks

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.

Requirements

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

See Also

Reference

GoObject Class
GoObject Members
RemoveObserver Method

 

 


© 2015. Northwoods Software Corporation. All Rights Reserved.

Send Feedback