Custom GoObject connecting to a custom GoLink

Hi there…

Im a GoDiagram newbie.

I have created a class that inherits from GoIconicNode.

My end-user needs to be able to connect (Link) from this inherited object (node) to another object through a custom GoLink class (not the default GoLink).

how to acomplish this, I mean, how (and where) to override the default GoLink with my custom GoLink?

Thanks a lot.


Set the GoView's NewLinkPrototype, like this link of code from the Flowgrammer sample:
this.NewLinkPrototype = new ChartLink();


Thanks for getting me back.

According to your code, I think it will create one instance od ChartLink and share that instance of ChartLink to all links that the user will create. Am I correct?

I need to have one instance per link (one-to-one), because my custom GoLink class has specific properties that has to hold specific data.

How do you see that?

Thanks a lot.

It doesn’t share the instance, it makes a copy of the NewLinkPrototype. See the section in the User’s Guide on “Linking”.

Thanks a lot!!