Page Index Toggle Pages: [1] 2 3  Send TopicPrint
Very Hot Topic (More than 25 Replies) cut (Read 12414 times)
balajigcs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 32
Joined: Aug 18th, 2008
cut
Sep 9th, 2008 at 5:14am
Print Post  
how to cut the node from the flowchart.. actually I am using..

private void OnCopyToolStripMenuItemClick(object sender, EventArgs e)
{
fpidiagramviewobject.CutToClipboard(false);
}

private void OnEditMenuClick(object sender, EventArgs e)
{
this.cutToolStripMenuItem.Enabled = this.diagram.ActiveItem != null;
}

then one run time error coming.. that is the value cannot be null
  

Thanks & Regards,&&&&Balaji
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: cut
Reply #1 - Sep 9th, 2008 at 6:49am
Print Post  
Set breakpoints in both methods and verify if fpidiagramviewobject, cutToolStripMenuItem and diagram are set.
  
Back to top
 
IP Logged
 
balajigcs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 32
Joined: Aug 18th, 2008
Re: cut
Reply #2 - Sep 9th, 2008 at 7:02am
Print Post  
both are setted properly but even the rut time error coming like this..

In that stmt.. the error coming..
this.fpiDiagramView.CutToClipboard(false);

Value cannot be null.
Parameter name: value
  

Thanks & Regards,&&&&Balaji
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: cut
Reply #3 - Sep 9th, 2008 at 7:12am
Print Post  
Could you copy the stack trace here?
  
Back to top
 
IP Logged
 
balajigcs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 32
Joined: Aug 18th, 2008
Re: cut
Reply #4 - Sep 9th, 2008 at 8:49am
Print Post  
>WB.Pariksha.FPI.dll!WB.Pariksha.FPI.FPIEditorControl.OnCutToolStripMenuItemClic
k(object sender = {Cut}, System.EventArgs e = {System.EventArgs}) Line 299C#
FPITestApplication.exe!FPITestApplication.Program.Main() Line 17 + 0x1a bytesC#
  

Thanks & Regards,&&&&Balaji
Back to top
 
IP Logged
 
balajigcs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 32
Joined: Aug 18th, 2008
Re: cut
Reply #5 - Sep 9th, 2008 at 10:35am
Print Post  
The following is the stack Trace:

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.CopyToClipboard2(Boolean persist, Boolean groups)
      at MindFusion.Diagramming.WinForms.DiagramView.CutToClipboard(Boolean copy, Boolean groups)
      at MindFusion.Diagramming.WinForms.DiagramView.CutToClipboard(Boolean copy)
      at WB.Pariksha.FPI.FPIEditorControl.OnCutToolStripMenuItemClick(Object sender, EventArgs e) in D:\users\balaji G\CVS-WD\Pariksha\src\WB.Pariksha.FPI\FPIEditorControl.cs:line 301
      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.UnsafeNat
iveMethods.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 FPITestApplication.Program.Main() in D:\users\balaji G\CVS-WD\Pariksha\src\TestApplications\FPITestApplication\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()

- Balaji
  

Thanks & Regards,&&&&Balaji
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: cut
Reply #6 - Sep 9th, 2008 at 10:42am
Print Post  
Are you using any custom items?
  
Back to top
 
IP Logged
 
balajigcs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 32
Joined: Aug 18th, 2008
Re: cut
Reply #7 - Sep 9th, 2008 at 10:50am
Print Post  
Hi,

I am using a Microform which takes in a string. I need to cut this item. When I try to cut it, the above exception is thrown. We create an XML out of the flowchart, the interpretation of the microform is as follows in out application:

<Helpline Comment="Test"/>

Where Helpline is the name that we are using for the Microform
  

Thanks & Regards,&&&&Balaji
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: cut
Reply #8 - Sep 9th, 2008 at 12:54pm
Print Post  
Is Microform your custom node type, or a ShapeNode whose Shape is set to 'Microform'?
  
Back to top
 
IP Logged
 
balajigcs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 32
Joined: Aug 18th, 2008
Re: cut
Reply #9 - Sep 10th, 2008 at 6:16am
Print Post  
Hi,

   Miroform is a shapenode.. I am setting the mindfusion shapenodes only..
  

Thanks & Regards,&&&&Balaji
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: cut
Reply #10 - Sep 10th, 2008 at 7:47am
Print Post  
Hi,

Please email the diagram, saved using the SaveToXml method, to support@mindfusion.eu.

Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: cut
Reply #11 - Sep 11th, 2008 at 2:00pm
Print Post  
Okay, you've derived from ShapeNode and set the Shape to Microform, but that's still a custom node class. You must either override the virtual DiagramItem Clone(bool clipboard) method, or implement a copy constructor for clipboard operations to work correctly.

Stoyan
  
Back to top
 
IP Logged
 
balajigcs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 32
Joined: Aug 18th, 2008
Re: cut
Reply #12 - Sep 23rd, 2008 at 2:27pm
Print Post  
Hi,

     yes, its working properly when I am using copy constructor. But I copied a node and paste that node then the node coming properly only but the previously setted propererty values for that node are not coming properly.. How we get that node with previously setted property values when i am using copy paste.. Would u please help me how to solve this problem..

       and one more doubt is when I cut the node then the links are also cutting with node and paste it only node is coming there is any posiblity to come node with link.

       Thanks for ur helpful answers..
  

Thanks & Regards,&&&&Balaji
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: cut
Reply #13 - Sep 23rd, 2008 at 3:37pm
Print Post  
Additionally to copying their values in the copy constructor, you must implement serialization for your custom properties by overriding the SaveTo and LoadFrom methods of DiagramItem.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
balajigcs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 32
Joined: Aug 18th, 2008
Re: cut
Reply #14 - Sep 24th, 2008 at 3:43am
Print Post  
Actually my copy constructor is like this:
   public HelpLine(HelpLine helpLine): this()
    {
this.comment = helpLine.comment;
   }

here  comment is my custom property..

Can u please explain with simple code how to serialize my custom properties?
  

Thanks & Regards,&&&&Balaji
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 3 
Send TopicPrint