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.
Unfortunately, activation email could not send to your email. Please try again.

Serialization / Clone Issue with Nodes dragged from SymbolPalette to Diagram

Thread ID:

Created:

Updated:

Platform:

Replies:

75001 Jul 8,2008 05:38 AM Jul 11,2008 03:54 AM Windows Forms 5
loading
Tags: Diagram
Bernhard Jahn
Asked On July 8, 2008 05:38 AM

Hi,

I have been creating a Symbol with the SymbolDesigner and ran ancross some Issue when I use the created Symbol in a SymbolPalette. As soon as I drag the Symbol to a Diagram, some information previously stored in the symbol by hand gets lost. The following objects are null afterwards or contain incomplete information:
- Node.Tag : null
- ConnectionPoint.ConnectionPointType : reset to IncomingOutgoing
- ConnectionPoint.Name : null

I assume dragging some Node from SymbolPalette to a Diagram clones the object and the cloning is restricted to only some but not all properties. I was able to solve these problems by subclassing the ones, that were missing some important information and overriding the Clone method, well for now. But for this I have to deserialize the .edp file, and modify the object tree afterwards, which seems to be hacky to me. Is there another solution?

Regards,

Bernhard


J.Nagarajan [Syncfusion]
Replied On July 8, 2008 05:47 AM

Hi Bernhard ,

Thanks for your interest in Syncfusion products.

This is known issue and this issue has been fixed in our latest source and the fix is available in our latest release(v6.3.0.25). You can download this version from the following page.

http://www.syncfusion.com/downloads/latestversion/default.aspx

Unlock key:

If your Essential Studio license is current,you will be able to obtain the key to install this version from your account in DirectTrac Otherwise, please contact your Syncfusion Sales Representative or e-mail salessupport@syncfusion.com

Our latest version of diagram can support to serialize Node.Tag, ConnectionPoint.ConnectionPointType and ConnectionPoint.Name properties.

Please let me know if you have any problem in our latest version.

Regards,
Nagaraj



Bernhard Jahn
Replied On July 8, 2008 07:40 AM

Great!

All issues have been resolved! Thanks for the quick answer.

>Hi Bernhard ,

Thanks for your interest in Syncfusion products.

This is known issue and this issue has been fixed in our latest source and the fix is available in our latest release(v6.3.0.25). You can download this version from the following page.

http://www.syncfusion.com/downloads/latestversion/default.aspx

Unlock key:

If your Essential Studio license is current,you will be able to obtain the key to install this version from your account in DirectTrac Otherwise, please contact your Syncfusion Sales Representative or e-mail salessupport@syncfusion.com

Our latest version of diagram can support to serialize Node.Tag, ConnectionPoint.ConnectionPointType and ConnectionPoint.Name properties.

Please let me know if you have any problem in our latest version.

Regards,
Nagaraj





Bernhard Jahn
Replied On July 9, 2008 08:12 AM

I think I was too fast on this one. It is still necessary to subclass the used subclass of Node(in my case Group), so that the Tag property gets cloned as well as soon as I drag something from a SymbolPalette to the Diagram. Not that this is causing to any bigger problems for me now, but I still consider it a bit hacky for my taste.


J.Nagarajan [Syncfusion]
Replied On July 10, 2008 06:20 AM

Hi Bernhard ,

You need not again sub class the group node to serialize the tag property in a Symbolpalette. You have to call Clone overridden method in the Group's subclass. Please refer to the attached sample for more details.

http://websamples.syncfusion.com/samples/Diagram.Windows/F75001/main.htm

In this sample when you can drag and drop the group node from the palette. You can get the Tag properties of each child node a group when you select them.

Please refer to it and let me know if this helps.

Regards,
Nagaraj



Bernhard Jahn
Replied On July 11, 2008 03:54 AM

That's exactly what I've been doing. Subclassing Group(like in the example) and provide a Clone methode(not like in the example) that checks if Group.Tag is ICloneable and then calls Clone on it. Then it puts the cloned Tag object into the cloned Group(which it gets by calling base.Clone() of Group). This is returned to the calling code(something somewhere in the GUI). My suggestion is, to put this kind of functionality into all Clone() methods: a check if Tag is ICloneable, and clone this one, too, prior to returning the cloned Node back.

>Hi Bernhard ,

You need not again sub class the group node to serialize the tag property in a Symbolpalette. You have to call Clone overridden method in the Group's subclass. Please refer to the attached sample for more details.

http://websamples.syncfusion.com/samples/Diagram.Windows/F75001/main.htm

In this sample when you can drag and drop the group node from the palette. You can get the Tag properties of each child node a group when you select them.

Please refer to it and let me know if this helps.

Regards,
Nagaraj





CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;