[Mono-winforms-list] Moving Items property into ListControl
Dennis Hayes
DENNISH@Raytek.com
Fri, 22 Aug 2003 12:03:35 -0700
DataSource_ and DisplayMember_ should be private.
They probably should be internal.
Dennis
-----Original Message-----
From: Brian Takita [mailto:brian.takita@runbox.com]
Sent: Friday, August 22, 2003 1:35 AM
To: Duncan Mak
Cc: mono-winforms-list@lists.ximian.com
Subject: Re: [Mono-winforms-list] Moving Items property into ListControl
Hello Duncan,
Here is the revised ListControl class.
I took a better look at the ListControl, and found the following...
>> public abstract class ListControl : Control {
>>
>> protected object DataSource_;
>> [MonoTODO]
>> public virtual object DataSource {
>>
>>
DataSource_ and DisplayMember_ should be private.
>The 1.1 SDK docs list this property without the virtual keyword. Was
>that an MS documentation bug?
>
>
DataSource is not virtual in ListControl.
>
>
>>set {
>> if(DataSource_ != value) {
>> if((value is IList) || (value is IListSource)) {
>> DataSource_ = value;
>> OnDataSourceChanged(new EventArgs());
>> }
>> else {
>> throw new Exception("Complex DataBinding accepts as
a data source either an IList or an IListSource");
>> }
>> }
>>}
>>
>>
>
>I made indenting changes here to make the code better conform to the
>Mono coding style. Also, the 1.1 SDK docs does not say the property will
>throw any Exceptions at all. Is that also a documentation bug?
>
>
This is a documentation bug. I got an exception when DataSource was not
set to an IList or an IListSource object. The exception message was
taken verbatim from MS's exception. Should I rewrite a new exception
message to avoid plagerism?
Also, where are the docs on coding standards?
>Thanks for the patch!
>
>Duncan.
>
Glad to help. I'm learning alot about .NET already. Thanks for the
feedback!!
Brian
>_______________________________________________
>Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>
>
>
>