Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Stack overflow on deleting a row from a TableNode (Read 2114 times)
kmontgom
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Nov 13th, 2008
Stack overflow on deleting a row from a TableNode
Apr 7th, 2009 at 9:07pm
Print Post  
Not sure if this is a bug or something I'm doing wrong....

I have two TableNode instances, multiple rows in each TableNode. I have DiagramLink's between rows in the two TableNodes.

In my UI, I use a right-click context menu to invoke functionality to delete a row from one table.

Step 1 is to enumerate all DiagramLinks between the selected row and any other row in any other table (this is both outgoing and incoming links)

Step 2 is to call IncomingLinks.Clear() and OutgoingLinks.Clear() for the selected row in the specific TableNode

Step 3 is to actually remove the previously enumerated diagram links

Step 4 is to actually remove the selected row from the specified TableNode.
I've tried TableNode.Rows.RemoveAt(), TableNode.Rows.Remove(), and both function calls cause the stack overflow condition to occur.

I even thought that the problem was caused by one thread attempting to update the TableNode outside the UI thread, even though there was no sign of that particular error message; I moved the row deletion code to a delegate and invoked it from Dispatcher.BeginInvoke(....). Same error occurs.

Any thoughts?
  
Back to top
 
IP Logged
 
kmontgom
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Nov 13th, 2008
Re: Stack overflow on deleting a row from a TableN
Reply #1 - Apr 7th, 2009 at 9:19pm
Print Post  
Disregard this!

I need to RTFM more frequently, and stop depending on Intellisense so much.

As from your documentation:

"Do not use this method directly. Use the DeleteRow method of the TableNode class instead."
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Stack overflow on deleting a row from a TableN
Reply #2 - Apr 8th, 2009 at 7:53am
Print Post  
Yep, we very much want to add support for directly adding and removing objects from the Rows, Columns, ControlPoitns, etc. collections; only if we had a couple of weeks free from urgent requests to do this ... Undecided
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint