Problem Closing Form after Save

Problem Closing Form after Save

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


eslater posted on Monday, May 14, 2007

I am using CSLA 1.5 with Active Objects.  When the user clicks OK it calls ApplyEditSave which saves the changes (this seems to go ok) and then does a Me.Close.  When it hits me.close it takes a really long time before the form closes.  It seems to get stuck in UndoableBase in UndoChanges.  Does anyone have any ideas why it might be getting stuck doing this?

Thanks,
Elliot

RockfordLhotka replied on Monday, May 14, 2007

Do you have any sort of circular reference in your object model (direct or indirect)? Most common would be a parent reference of some sort, but sibling references can be circular as well.

If that is the case, n-level undo will go into an infinite loop.

To resolve the issue, use the NotUndoable attribute on an appropriate field to break the circular reference chain.

eslater replied on Tuesday, May 15, 2007

I think I have NotUndoable on all of my parent references but I guess I need to go in and check for other possibilities since it seems like this must be the case.

Copyright (c) Marimer LLC