Bug(s) in BusinessListBase and ReadOnlyBindingList?!

Bug(s) in BusinessListBase and ReadOnlyBindingList?!

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


McManus posted on Tuesday, March 25, 2008

Hi all,

We found the following two problems in CSLA 3.5 beta 2:

  1. BusinessListBase throws a NullReferenceException when ClearItems() is called and the collection does not contain any items. The exception is thrown because the field _positionMap is null in this case.Possible solution: call DeferredLoadPositionMapIfNotLoaded() before calling _positionMap.ClearMap()
  2. ReadOnlyBindingList throws a NullReferenceException when ClearItems() is called and the collection does not contain any items. The exception is thrown because the field _indexSet is null in this case. Possible solution: call DeferredLoadIndexIfNotLoaded() before calling _indexSet.ClearIndexes()

Hopefully these problems can be fixed before CSLA 3.5 is released?!

Cheers,
Herman

RockfordLhotka replied on Tuesday, March 25, 2008

I believe these were reported a few days ago and were addressed. Please give the new RC1 build (online today) a try and see if that resolves the issues.

McManus replied on Wednesday, March 26, 2008

Rocky,

In ReadOnlyBindingList the issue is solved indeed.

However, in BusinessListBase the exception still occurs. Note that in BusinessListBase the exception is thrown because _positionMap is null. The field _indexSet is handled correctly.

Cheers,
Herman

Copyright (c) Marimer LLC