Hello,
I'm getting the following crash when I have programmatically created some nodes and want to copy the selected items to the clipboard.
System.ArgumentNullException was unhandled
Message="Value cannot be null.\r\nParameter name: value"
Source="mscorlib"
ParamName="value"
StackTrace:
at System.Collections.CollectionBase.OnValidate(Object value)
at System.Collections.CollectionBase.System.Collections.IList.set_Item(Int32 index, Object value)
at MindFusion.Diagramming.DiagramItemCollection.set_Item(Int32 index, DiagramItem value)
at MindFusion.Diagramming.Diagram.CopySelection(Diagram source, Boolean unconnectedLinks, Boolean copyGroups)
at MindFusion.Diagramming.WinForms.DiagramView.xd387e793db5b6581(Boolean x14d6ee1d6b77a32d, Boolean xf7b2c9839607605d)
at MindFusion.Diagramming.WinForms.DiagramView.CopyToClipboard(Boolean persist, Boolean groups)
at MindFusion.Diagramming.WinForms.DiagramView.CopyToClipboard(Boolean persist)
at AnimationSequencer.AnimationSequencer.copyToolStripMenuItem_Click(Object sender, EventArgs e) in C:\Perforce\f1branches\dev\dev1\programming\tools\game\AnimationSequencer\AnimationSequencer.cs:line 1299
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at AnimationSequencer.Program.Main() in C:\Perforce\f1branches\dev\dev1\programming\tools\game\AnimationSequencer\Program.cs:line 17
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
the code i'm using to copy to the clipboard is:
m_diagramView.CopyToClipboard(false);
is there any other initialisation I need to do that I'm missing to allow clipboard functionality to work.
also Im using custom node types.