Object references in links

walter, i have a question regarding links. I use the property GoView.NewGoLabeledLink to switch between different link types. But if my links contain references to link specific data (e.g. a list with materials which belong to this link) these references are copied, too. What i need is, that each link has it’s own data object. But i can not think of how to do it best because neither constructor nor any kind of initialization is executed. Do you have any suggestions?

If i avoid using NewGoLabeledLink maybe i can overide GoToolLinking. Is it possible to use GoToolLinking.CreateTemporaryLink to create a very simple link type used while dragging and GoToolLinking.DoNewLink to create and initialize a link (or a combination of link->node->link)?

The GoView.NewLinkPrototype object is copied by GoView.CreateLink, which is called by various methods.
The easiest thing to do, which most of the sample applications do when they need to provide custom information for each newly created link, is to implement a GoView.LinkCreated event handler.
Or you could override GoView.CreateLink or GoToolLinkingNew.DoNewLink.