Menu

#157 Using FastObjectListView with IVirtualListDataSource crashed at FilteredObjects and Objects

C#_v2.9
wont-fix
4
2016-05-05
2016-01-13
No

I think this is an error in design. FastObjectListView inherits VirtualObjectListView which implements the property VirtualListDataSource as type IVirtualListDataSource.

If one implements the virtual list source as a new class that just implements the interface IVirtualListDataSource, but does not inherit FastObjectListDataSource and then assigns one instance of this class to FastObjectListView.VirtualListDataView, an InvalidCastException will be thrown when accessing property FilteredObjects or Objects.

In these properties the VirtualListDataSource is casted to FastObjectListDataSource which will not work in that case.

Discussion

  • Phillip Piper

    Phillip Piper - 2016-01-13

    Not really a design error -- more of a limit on what can be expressed in the language.

    VirtualObjectListView uses a IVirtualListDataSource.

    FastObjectListView has to have a FastObjectListDataSource.

     
  • Phillip Piper

    Phillip Piper - 2016-05-05
    • status: open --> wont-fix
     

Log in to post a comment.