Author: toshok
Date: 2006-10-31 17:13:29 -0500 (Tue, 31 Oct 2006)
New Revision: 67195
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs
Log:
* ListControl.cs (set_SelectedValue): don't throw exceptions on
null/"" value, just return. matches ms's behavior and fixes some
failing tests.
2006-10-31 Chris Toshok <[EMAIL PROTECTED]>
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-10-31 22:11:56 UTC (rev 67194)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-10-31 22:13:29 UTC (rev 67195)
@@ -1,5 +1,11 @@
2006-10-31 Chris Toshok <[EMAIL PROTECTED]>
+ * ListControl.cs (set_SelectedValue): don't throw exceptions on
+ null/"" value, just return. matches ms's behavior and fixes some
+ failing tests.
+
+2006-10-31 Chris Toshok <[EMAIL PROTECTED]>
+
* Control.cs (set_Capture): make a logic a little easier to
follow.
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs
2006-10-31 22:11:56 UTC (rev 67194)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs
2006-10-31 22:13:29 UTC (rev 67195)
@@ -131,15 +131,13 @@
return fil;
}
set {
- if (value == null) {
- throw new
InvalidOperationException("ListControl.SelectedValue cannot be set to null");
- }
+ if (value == null)
+ return;
if (value is string) {
string valueString = value as string;
- if (valueString == String.Empty) {
- throw new
InvalidOperationException("ListControl.SelectedValue cannot be set to empty
string");
- }
+ if (valueString == String.Empty)
+ return;
}
if (data_manager != null) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches