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.

System Stack Overflow Exception

Thread ID:

Created:

Updated:

Platform:

Replies:

37781 Nov 30,2005 05:07 AM Dec 13,2005 11:51 AM Windows Forms 7
loading
Tags: Diagram
Denny Huang
Asked On November 30, 2005 05:07 AM

Hello there, In my project using VS C++ .NET 2003, I new a Group, a Rectangle and a TextNode, then I append Rectangle and TextNode to group. Finally, I append the group to diagram.(all are done in code) the System Stack Overflow Exception occured when I run my program, and try to drag the group.

Administrator [Syncfusion]
Replied On November 30, 2005 10:19 AM

Hi Denny, I assume you are using v 3.3.0.0 or the later 3.3.0.10 build of Essential Diagram. If you are using an earlier build, please be sure to upgrade to the latest version as soon as possible. As for inserting nodes into a group, please try to first add the Rectangle and TextNodes directly to the diagram, and then use the Syncfusion.Windows.Forms.Diagram.GroupCmd command class to create a group composed of the required nodes. The following code shows how to go about this, GroupCmd grpcmd = new GroupCmd(); grpcmd.Nodes.Add(mytxtnode); grpcmd.Nodes.Add(myrectnode); this.diagram1.Controller.ExecuteCommand(grpcmd); Please let us know if the above implemnetation poses the same problem as well. Thanks Prakash Surendra Syncfusion Inc.,

Denny Huang
Replied On November 30, 2005 11:17 PM

Hi Prakash, It still poses the same problem after following you direction. Here is my code snippet: Syncfusion::Windows::Forms::Diagram::Rectangle* partiBound = new Syncfusion::Windows::Forms::Diagram::Rectangle(x, y, x+width, y+height); TextNode* nameNode = new TextNode(S"NameText"); diagram1->Model->AppendChild(partiBound); diagram1->Model->AppendChild(nameNode); GroupCmd* grpcmd = new GroupCmd(); grpcmd->Nodes->Add(partiBound); grpcmd->Nodes->Add(nameNode); this->PathDiagram->Controller->ExecuteCommand(grpcmd); >Hi Denny, > >I assume you are using v 3.3.0.0 or the later 3.3.0.10 build of Essential Diagram. If you are using an earlier build, please be sure to upgrade to the latest version as soon as possible. > >As for inserting nodes into a group, please try to first add the Rectangle and TextNodes directly to the diagram, and then use the Syncfusion.Windows.Forms.Diagram.GroupCmd command class to create a group composed of the required nodes. The following code shows how to go about this, > >GroupCmd grpcmd = new GroupCmd(); >grpcmd.Nodes.Add(mytxtnode); >grpcmd.Nodes.Add(myrectnode); > >this.diagram1.Controller.ExecuteCommand(grpcmd); > >Please let us know if the above implemnetation poses the same problem as well. > >Thanks >Prakash Surendra >Syncfusion Inc.,

Denny Huang
Replied On December 1, 2005 03:06 AM

I did some experiment: Only put TextNode in a Group, and it threw the exception when I dragged the group.

Administrator [Syncfusion]
Replied On December 2, 2005 06:07 PM

Denny, Thanks for the updated information. I will check this condition out, and update you as soon as possible. Thanks, Prakash Surendra Syncfusion Inc.,

Administrator [Syncfusion]
Replied On December 8, 2005 05:23 PM

Hey Denny, I was able to reproduce this problem. It was on account of the TextNode not having a size specified for it. You can workaround the condition by calling the TextNode.SizeToText(SizeF) method right after creating the TextNode, so that it has a valid bounds value associated with it when it is inserted into the diagram. The following code should give you an idea, TextNode txtnode = new TextNode("Hello World"); txtnode.SizeToText(new SizeF(500,50)); InsertNodesCmd inscmd = new InsertNodesCmd(); inscmd.Location = new PointF(50,50); inscmd.Nodes.Add(txtnode); this.diagramComponent.Controller.ExecuteCommand(inscmd); GroupCmd grpcmd = new GroupCmd(); grpcmd.Nodes.Add(txtnode); this.diagramComponent.Controller.ExecuteCommand(grpcmd); I believe we already have a QA report on the TextNode class related to this issue. I will up the priority on the problem, and we will definitely fix this issue in a future release of the product. Thanks, Prakash Surendra Syncfusion Inc.,

Denny Huang
Replied On December 8, 2005 11:14 PM

Hi Prakash, Thanks for your reply. Unfortunatelt, it still doesn''t work. the error can be reproducted using VC++ .NET. Here is the VC++ code (modified from yours). Please help. Denny //////////////// TextNode* txtnode = new TextNode("Hello World"); txtnode->SizeToText(SizeF(500,50)); InsertNodesCmd* inscmd = new InsertNodesCmd(); inscmd->Location = PointF(50,50); inscmd->Nodes->Add(txtnode); this->diagram1->Controller->ExecuteCommand(inscmd); GroupCmd* grpcmd = new GroupCmd(); grpcmd->Nodes->Add(txtnode); this->diagram1->Controller->ExecuteCommand(grpcmd); ///////////////////// >Hey Denny, > >I was able to reproduce this problem. It was on account of the TextNode not having a size specified for it. You can workaround the condition by calling the TextNode.SizeToText(SizeF) method right after creating the TextNode, so that it has a valid bounds value associated with it when it is inserted into the diagram. The following code should give you an idea, > >TextNode txtnode = new TextNode("Hello World"); >txtnode.SizeToText(new SizeF(500,50)); > >InsertNodesCmd inscmd = new InsertNodesCmd(); >inscmd.Location = new PointF(50,50); >inscmd.Nodes.Add(txtnode); >this.diagramComponent.Controller.ExecuteCommand(inscmd); > >GroupCmd grpcmd = new GroupCmd(); >grpcmd.Nodes.Add(txtnode); >this.diagramComponent.Controller.ExecuteCommand(grpcmd); > >I believe we already have a QA report on the TextNode class related to this issue. I will up the priority on the problem, and we will definitely fix this issue in a future release of the product. > >Thanks, >Prakash Surendra >Syncfusion Inc.,

Administrator [Syncfusion]
Replied On December 13, 2005 11:51 AM

Denny, My tests were conducted on a machine running the 4.1 beta codebase, and calling TextNode.SizeToText() seemed to take care of the problem. Did you get a chance to try out this issue with the 4.1 beta? Did the new version make a difference? Thanks, Prakash Surendra Syncfusion Inc.,

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.

;