Stack overflow, recursive BOs?

Stack overflow, recursive BOs?

Old forum URL: forums.lhotka.net/forums/t/1362.aspx


Kinergy posted on Saturday, September 30, 2006

Hi, I thought I was exceedingly clever with my BO design and everything worked fine until I tried to bind an EditableRootList to a DataGridView. If anybody can help, it would be much appreciated! Here's what I did:

State: EditableRoot
-Products: EditableRootList of Product: EditableChild

Product also contains:

private State _state;

which introduces potential cyclical references.

The problem is that UndoableBase:CopyState() crashes with a stack overflow when I bind Products to a DataGridView. When I remove _state, everything works fine, but I need each of my BOs to have a reference to the top most BO so they can traverse the tree and access other objects as necessary. How can I fix my problem?

TIA,
K

PS. I'm using CSLA 2.1 RC1, it looks really nice! I'm looking forward to using the filtered lists in a few days, just what I needed!

 

Kinergy replied on Saturday, September 30, 2006

Never mind...

[NotUndoable()] fixed my problem!

Copyright (c) Marimer LLC