CSLA 3.6 Error on CancelEdit()

CSLA 3.6 Error on CancelEdit()

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


dlabar posted on Thursday, October 23, 2008

I just updated my CSLA dll from 3.0.3 to  the newest version (3.6.0 Beta 2), and now I'm getting a NullReference exception calling CancelEdit() on a specific object type.

The RaiseListChangedEvents is set to true, and in the Finally Section of the UndoChanges method, the OnListChanged call is rsulting in a Csla.LinqBindingList.SourceChanged() call, which is then calling BuildFilterIndex() which is getting a whereExpression value that is null so in this line:

Expression<Func<T, bool>> whereBody = (Expression<Func<T, bool>>)((UnaryExpression)(whereExpression.Arguments[1])).Operand;

The whereExpression.Arguments[1] throws a null reference exception.  Has something changed between these version that I'm missing?

Any help you can give would be much appreciated.  Thanks.

RockfordLhotka replied on Thursday, October 23, 2008

Many things have changed between 3.0.x and 3.6 :)

Aaron, who's the primary author of the LINQ to CSLA functionality, is on vacation (probaby enjoying a fine dinner as I type). I'll add a bug entry so he (or I) can look at it in the next week or so.

It may be as simple as adding a null check around that code - I don't know.

dlabar replied on Thursday, October 23, 2008

Thanks. I'm looking forward to whatever solution you can provide. I know 3.6 is providing much more support for LINQ. Is there any example documentation for some of its new features available, or do I have to wait for the 2008 Business Objects book?

RockfordLhotka replied on Thursday, October 23, 2008

You'll have to wait for the book.

Rocky

-----Original Message-----
From: dlabar [mailto:cslanet@lhotka.net]
Sent: Thursday, October 23, 2008 12:53 PM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] CSLA 3.6 Error on CancelEdit()

Thanks. I'm looking forward to whatever solution you can provide. I know
3.6 is providing much more support for LINQ. Is there any example
documentation for some of its new features available, or do I have to wait
for the 2008 Business Objects book?

dlabar replied on Monday, November 03, 2008

Is there any update on this?

RockfordLhotka replied on Monday, November 03, 2008

I know Aaron is back from holiday and is catching up on things, but I don't know that he's gotten to this yet. I put a bug into the tracker for this issue, so it shouldn't get lost.

Copyright (c) Marimer LLC