Northwoods.Go Assembly > Northwoods.Go Namespace > GoGroup Class : CopyChildren Method |
'Declaration Protected Overridable Sub CopyChildren( _ ByVal newgroup As GoGroup, _ ByVal env As GoCopyDictionary _ )
protected virtual void CopyChildren( GoGroup newgroup, GoCopyDictionary env )
newgroup.Add(env.Copy(obj))
for each child obj
. However, your group subclass may want to keep track of some or all of the children for its own purposes. To that end you can override this method to do the copying manually, thereby correctly maintaining your subclass's internal pointers to children. You probably should not be calling GoObject's GoObject.CopyObject, but GoCopyDictionary's Copy or indexed lookup instead.base.CopyChildren(newgroup, env);
MyNode newnode = (MyNode)newgroup;
newnode.myIcon = (GoObject)env[myIcon];
newnode.myLabel = (GoText)env[myLabel];
newnode.myInPort = (GoPort)env[myInPort];
newnode.myOutPort = (GoPort)env[myOutPort];
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