[Mono-winforms-list] Moving Items property into ListControl

Duncan Mak duncan@ximian.com
Fri, 22 Aug 2003 00:45:07 -0400


Hello Brian!

On Thu, 2003-08-21 at 16:15, Brian Takita wrote:
> Dennis,
> 
> I made a revision to the ListControl.
> 

I have just committed this patch to CVS.

Some questions:

>     public abstract class ListControl : Control {
> 
> 		protected object DataSource_;
> 		[MonoTODO]
> 		public virtual object DataSource {

The 1.1 SDK docs list this property without the virtual keyword. Was
that an MS documentation bug?

> 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?

Thanks for the patch!

Duncan.