N-Level Undo

N-Level Undo

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


tim.davenport posted on Tuesday, October 18, 2011

Hi,

I've come across an odd scenario where a call to any of the N-Level undo related methods, such as BeginEdit(), causes an 'object reference not set to an instance of an object' exception. The object that I'm calling BeginEdit() on was built with CSLA 2.1.4 (I have other versions installed in my GAC), and I have a reference to the project that contains this object in a simple win forms app that creates an instance of the object via a standard CSLA factory method and then calls BeginEdit() on it.

If I build the win forms project with a  later version to 2.1.4 from the GAC I get the exception in UndoableBase in the CopyState method when it tries to get a list of fields for the current object. This exception is not being thrown if I reference version 2.1.4 of CSLA. I do realise that I can probably just compile a new version of the old project using the latest version of CSLA and that should solve it, but I was just wondering if anyone had any ideas why this is happening?

Thanks in advance,

Tim

 

Copyright (c) Marimer LLC