Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Showstopper error from mindfusion Demo dll (Read 3280 times)
binuvc
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 46
Joined: Nov 7th, 2011
Showstopper error from mindfusion Demo dll
Nov 7th, 2011 at 11:43am
Print Post  
When I change the Style property of a Link programmatically to LinkStyle.Cascading, the below Error was caught.

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2; MS-RTC LM 8; .NET4.0C; .NET4.0E)
Timestamp: Fri, 4 Nov 2011 04:38:22 UTC


Message: Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError

Message: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List`1.get_Item(Int32 index)
at MindFusion.Diagramming.Silverlight.DiagramLink.x4cf22ee19af1c11d(Point x3bd62873fafa6252, InteractionState xab29833053004740)
at MindFusion.Diagramming.Silverlight.DiagramLink.UpdateDrag(InteractionState ist)
at MindFusion.Diagramming.Silverlight.InteractionState.Update(Point currentPoint)
at MindFusion.Diagramming.Silverlight.BehaviorBase.OnMouseMove(MouseEventArgs e)
at MindFusion.Diagramming.Silverlight.Diagram.x2c5d1da1234c3a6a(Object xe0292b9ed559da7d, MouseEventArgs xfbf34718e704c6bc)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Showstopper error from mindfusion Demo dll
Reply #1 - Nov 7th, 2011 at 11:50am
Print Post  
Are you by chance setting Style from a LinkCreating or LinkModifying event handler?
  
Back to top
 
IP Logged
 
binuvc
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 46
Joined: Nov 7th, 2011
Re: Showstopper error from mindfusion Demo dll
Reply #2 - Nov 9th, 2011 at 12:43pm
Print Post  
No, I have my custom XML format containing nodes and links and I am trying to create shape nodes and diagram links through code. I am using the Factory.CreateDiagramLink()

code as below:

DiagramLink newlink = diagramInstance.Factory.CreateDiagramLink(
nodeMap[link.Attribute("BeginActivityUniqueID").Value] as ShapeNode,
Convert.ToInt32(link.Element("UILayout").Element("BeginConnectionPoint").Value)
,
nodeMap[link.Attribute("EndActivityUniqueID").Value] as ShapeNode,
Convert.ToInt32(link.Element("UILayout").Element("EndConnectionPoint").Value));


newlink.Style = LinkStyle.Cascading

The error occurs when I try to detach the head of the link from the end node.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Showstopper error from mindfusion Demo dll
Reply #3 - Nov 9th, 2011 at 1:16pm
Print Post  
The CreateLink override used to attach links to a specific anchor point does not check if the anchor point actually exists. Are you sure the point indices are smaller than the number of anchor points in nodes' AnchorPattern?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint