Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic NullReferenceException with OriginIndex (Read 1854 times)
cspurling
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: May 1st, 2008
NullReferenceException with OriginIndex
May 1st, 2008 at 1:34am
Print Post  
Not a high priority bug but probably still needs to be fixed.

When creating a link between two table nodes, if you set the OriginIndex before you assign a destination node to the link a NullReferenceException is thrown.

The code below throws the exception:
DiagramLink lnk1 = new DiagramLink(diagram1);
lnk1.Origin = nde1;
lnk1.OriginIndex = 0;  // exception thrown here
lnk1.Destination = nde2;
lnk1.DestinationIndex = 1;
diagram1.Links.Add(lnk1);

You need to assign the destination node first:
DiagramLink lnk1 = new DiagramLink(diagram1);
lnk1.Origin = nde1;
lnk1.Destination = nde2;
lnk1.OriginIndex = 0;
lnk1.DestinationIndex = 1;
diagram1.Links.Add(lnk1);
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: NullReferenceException with OriginIndex
Reply #1 - May 1st, 2008 at 7:12am
Print Post  
Thank you for your feedback, we'll surely fix this in the next version.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint