Bug in CslaActionExtender.cs?

Bug in CslaActionExtender.cs?

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

Kyle posted on Wednesday, September 15, 2010

In the OnClick method, just before the save is performed the OnObjectSaving event is fired with a new CancelEventArgs named savingArgs. BUT, after it returns, the wrong CancelEventArgs variable is checked, thus you cannot (as intended) cancel the save using the _ObjectSaving event handler. Fortunately the fix is very easy... hopefully can make it into the next release.

// Line 654

CslaActionCancelEventArgs savingArgs = new CslaActionCancelEventArgs(false, props.CommandName);


if (!savingArgs.Cancel)    // was: if (!args.Cancel)

                    {  // continue with save



Kyle replied on Wednesday, September 15, 2010

Forgot to mention, I'm talking about 3.8.3.

RockfordLhotka replied on Wednesday, September 15, 2010

I'll add this to the bug list.

Copyright (c) Marimer LLC