We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Source code different from assemblies?

Hello,

I'm using version 8.2.0.18 and I wanted to modify the ControlNode class in the diagrams component. As I have a source license I copied the ControlNode class source into your ControlsGalore sample, renamed the class and the namespace and used the copied class instead of the original one.

I would exepect that this class behaves like the ControlNode class from the corresponding syncfusion assembly. But it behaves completely different. I can't activate my nodes and it displays the control incomplete.

To reproduce copy class ControlNode (from Syncfusion\Essential Studio\8.2.0.18\Base\Diagram.Base\Src\Nodes\RectangleBased) into ControlsGalore project and rename the class to AppEngineControlNode. Create a custom control VariableDeclarationControl with a label and textbox. Then use either the new and the original control as below:

VariableDeclarationControl ctl = new VariableDeclarationControl();
AppEngineControlNode ctlNode = new AppEngineControlNode(ctl, new RectangleF(100, 400, 200, 100));
diagram1.Model.AppendChild(ctlNode);

VariableDeclarationControl ctl = new VariableDeclarationControl();
ControlNode ctlNode = new ControlNode(ctl, new RectangleF(100, 400, 200, 100));
diagram1.Model.AppendChild(ctlNode);

You should see that the copied class behaves competely different then.

Could you tell me why this happens and why the source of the assemblies shipped with this version is obivously different from the assemblies you ship (the source for example has additional properties which are not found in the assembly)?

How can I make this work and can I make use of the source code if it's different from the compiled assemblies? We bought the source license to be able to fix issues ourselves in case but now it seems to be quite dangerous if the source does not correspond to the binaries.


Regards,
Christian











5 Replies

AA Amsath Ali M Syncfusion Team February 10, 2012 12:10 PM UTC

Hi Christian,

Thanks for using Syncfusion products.

1. We are afraid that we are unable to reproduce the issue reported by you at our end. Could you please share us more information probably a sample which reproduces the reported issue which will be more helpful for us to provide a better solution to you?

Here is the sample:
Controls Galore-794441571.zip

Also please note that the source of the assemblies shipped with the version (8.2.0.18) is not different from the assemblies we ship.

Please try the above sample and let us know if you have any queries.

Regards,
Amsath Ali. M




CR Christian Rattat February 15, 2012 04:58 PM UTC

Hi,

I found the issue. The behavior is different as there is a special treatment implemented in the core routines for class ControlNode, e.g. in MoveTool and some other classes.

I.e. even if you implement the same class with just a different name it will not be considered internally as there is an explicit comparision if the current node is of type ControlNode and therefore fails to work correctly (you get drawing and refesh issues).

This also means that it's actually impossible to implement an own version of ControlNode (or any node with the same behavior) as one had to modify the syncfusion diagram core functions to work correctly.

Thanks,
Christian



AA Amsath Ali M Syncfusion Team February 21, 2012 04:25 AM UTC

Hi Christian,

Thanks for the update and sorry for the delay in getting back to you.

We are afraid that we are unable to reproduce the issue [Drawing and refresh issues] reported by you at our end. Since we are able to draw and refresh the custom control nodes without any issues, could you please share us more information probably a video which clearly shows the issue or modify the below sample to reproduce the reported issue, this will help us to reproduce the issue effectively at our end and to provide a better solution to you?

Here is the sample:
Controls Galore-740261526.zip

Please try the above sample and let us know if you have any queries.

Regards,
Amsath Ali. M




CR Christian Rattat February 21, 2012 06:16 AM UTC

Hi,

thanks for your sample but this is not what I meant.

Your node inherits(!) from class ControlNode. But this class does completely not what I want.

So what I did I took your source code of the original class ControlNode and made a copied class from it as I wrote before. My class does not inherit from ControlNode but reimplement your ControlNode.

If you take the original source code of ControlNode class and just rename the class, compile it and use it in your sample you attached you will see the effect. It cannot work as in some of your diagram tools there is explicit handling for the original ControlNode class (e.g. if (node is ControlNode) then do something).

This means you ControlNode class does not work without explicit implementations in your tool classes. So any similar implementation of your ControlNode with different names will not work as well without changing the tools implementation.

But this problem no longer exist to me. I have changed the concept of my implementation and will not use ControlNode as there is other quite ugly behavior in direct editing the content of control node which cannot be changed due to the concept of control node.

Regards,
Christian




















AA Amsath Ali M Syncfusion Team February 27, 2012 09:34 AM UTC

Hi Christian,

Thanks for the update.

Since the behavior of control node is different from other nodes, we have performed some explicit handling for the control node to check whether the node is control node or not. Hence any similar implementation of the control node with different names will not work due to that explicit handling and this is the default behavior of the Diagram control.

Please let us know if you have any queries.

Regards,
Amsath Ali. M



Loader.
Live Chat Icon For mobile
Up arrow icon