[Mono-bugs] [Bug 395209] New: Fix incompatibility between mono and Microsoft framework with respect to the HierarchicaDataBoundControl

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed May 28 15:52:44 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=395209


           Summary: Fix incompatibility between mono and Microsoft framework
                    with respect to the HierarchicaDataBoundControl
           Product: Mono: Class Libraries
           Version: SVN
          Platform: i386
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Web
        AssignedTo: mhabersack at novell.com
        ReportedBy: james.fitzsimons at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=218721)
 --> (https://bugzilla.novell.com/attachment.cgi?id=218721)
Patch to fix this issue

The attached patch fixes an in incompatibility between mono and the Microsoft
framework with respect to the HierarchicaDataBoundControl. In my project I have
a class (CategoryHierarchy) that implements IHierarchicalEnumerable and also
have a custom control (CategoryControl) that extends
HierarchicaDataBoundControl. In the Microsoft.Net framework I can set the
datasource of my CategoryControl to be an instance of CategoryHierarchy and
everything works as expected. This throws a null reference exception in Mono
because in the GetData method calls the GetDataSource method which returns the
datasource as a IHierarchicalDataSource. My CategoryHierarchy doesn't implement
IHierarchicalDataSource hence the null reference exception.

I noticed when inspecting the type of the returned HierarchicalDataSourceView
in visual studio that it was a ReadOnlyDataSourceView. There is no
documentation on this class and no implementation in Mono so I inferred that it
must be a basic default implementation of HierarchicalDataSourceView that is
used in the case where the datasource implements IHierarchicalEnumerable. I
have added a default implementation of  HierarchicalDataSourceView  (also
called ReadOnlyDataSourceView for conformity) and modified the GetData method
of the HierarchicalDataBoundControl such that if the datasource implements
IHierarchicalEnumerable it returns a new instance of ReadOnlyDataSourceView
instead of null.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list