Can't pass delegates to constructor method

Hi,

I’m attempting to integrate the EpForceDirectedGraph.cs library into VL.
This library implements the Force Directed layout for graph visualisation.
Something that is currently available only in beta AFAIK.

It requires a Renderer to be implemented inheriting from AbstractRenderer.

Since VL doesn’t support inheritance yet, I thought I would have the individual methods just call a delegate which would be set from VL, allowing the rendering logic to be patched.

For some reason however, there are issues with passing the delegates into my DelegateRenderer object.

When using the Region version of the Create method, I only receive null:
image

Which, further down the line, results in null exceptions.

Using the Node version, the automatically created delegates are miraculously incompatible:
image

There are certainly other ways to approach it but this feels like a bug or at least something is not clear to me.

Included is the patch and source code for the DelegateRenderer.
VL.ForceDirectedGraph.zip (47.7 KB)

Hi @domj,
Thirdparty delegates need to be wrapped at the moment There an explanation of it here

you can also make an interface with all methods you want to overwrite and implement that in VL. then you get named pins and stateful context for the methods. to use it, pass an instance of that to the constructor and call the interface methods.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.