Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic FlowChart is not marked as serializable (Cut/Copy) (Read 1865 times)
evans1dd
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 1
Joined: Jan 11th, 2008
FlowChart is not marked as serializable (Cut/Copy)
Jan 11th, 2008 at 8:01pm
Print Post  
I was just given support for a system in C#. When executing the CutToClipboard or CopyToClipboard methods I get this error:

Type 'MindFusion.FlowChartX.FlowChart' in Assembly 'FlowChart.NET, Version=4.1.0.23235, Culture=neutral, PublicKeyToken=a0d18338041985ba' is not marked as serializable.

I know there's not alot of information here, but I'll try to answer any questions that I can.

[code]

public ChartObject _currentObject = null;

private PointF _pasteDeltaPoint = new PointF(10, 10);
private bool _isPasteAction = false;

public void OnCopy(object sender, EventArgs e)
{
_currentObject = null;
_pasteDeltaPoint = new PointF(10, 10);



View.TheFlowChart.CopyToClipboard(false, true);
}

public void OnCut(object sender, EventArgs e)
{
_currentObject = null;
_pasteDeltaPoint = new PointF(10, 10);
View.TheFlowChart.CutToClipboard(false);
}

public void OnDocCut(object sender, EventArgs e)
{
_pasteDeltaPoint = new PointF(10, 10);
View.TheFlowChart.CutToClipboard(false);
}

public void OnDocPaste(object sender, EventArgs e)
{
_isPasteAction = true;
View.TheFlowChart.PasteFromClipboard(_pasteDeltaPoint.X++, _pasteDeltaPoint.Y++);
}

public void OnDocCopy(object sender, EventArgs e)
{
_pasteDeltaPoint = new PointF(10, 10);
View.TheFlowChart.CopyToClipboard(false, true);
}

[/code]
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: FlowChart is not marked as serializable (Cut/C
Reply #1 - Jan 12th, 2008 at 7:34am
Print Post  
Does your application display Flowcharts inside ControlHost nodes? In such case, you could handle the SerializeControl and DeserializeControl events to implement serialization of the hosted flowcharts (by means of the SaveToString and LoadFromString methods for example).

You might get a similar exception if the Tag of an item refers to a Flowchart instance. In such a case, set the Tag to null before calling CopyToClipboard, and restore it after that.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint