Author: jpobst
Date: 2007-05-16 11:38:04 -0400 (Wed, 16 May 2007)
New Revision: 77484
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TextBoxTest.cs
Log:
2007-05-15 Jonathan Pobst <[EMAIL PROTECTED]>
* Control.cs: Make IsInputCharInternal to allow controls to
override it and still match MS API.
* TextBoxBase.cs: Override IsInputCharInternal and always
return true.
[Fixes bug #81616]
2007-05-15 Jonathan Pobst <[EMAIL PROTECTED]>
* TextBoxTest.cs: Add test for IsInputChar method.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-05-16 15:33:14 UTC (rev 77483)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-05-16 15:38:04 UTC (rev 77484)
@@ -1,3 +1,11 @@
+2007-05-15 Jonathan Pobst <[EMAIL PROTECTED]>
+
+ * Control.cs: Make IsInputCharInternal to allow controls to
+ override it and still match MS API.
+ * TextBoxBase.cs: Override IsInputCharInternal and always
+ return true.
+ [Fixes bug #81616]
+
2007-05-15 Jackson Harper <[EMAIL PROTECTED]>
* TextBox.cs: Disable some of the menu options when using a
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
2007-05-16 15:33:14 UTC (rev 77483)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
2007-05-16 15:38:04 UTC (rev 77484)
@@ -4158,9 +4158,13 @@
if (!IsHandleCreated)
CreateHandle ();
+ return IsInputCharInternal (charCode);
+ }
+
+ internal virtual bool IsInputCharInternal (char charCode) {
return false;
}
-
+
protected virtual bool IsInputKey (Keys keyData) {
// Doc says this one calls IsInputChar; not sure what
to do with that
return false;
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
2007-05-16 15:33:14 UTC (rev 77483)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
2007-05-16 15:38:04 UTC (rev 77484)
@@ -2116,6 +2116,10 @@
internal abstract Color ChangeBackColor (Color backColor);
+ internal override bool IsInputCharInternal (char charCode)
+ {
+ return true;
+ }
#endregion // Private Methods
#if NET_2_0
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2007-05-16 15:33:14 UTC (rev 77483)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2007-05-16 15:38:04 UTC (rev 77484)
@@ -1,3 +1,7 @@
+2007-05-15 Jonathan Pobst <[EMAIL PROTECTED]>
+
+ * TextBoxTest.cs: Add test for IsInputChar method.
+
2007-05-11 Gert Driesen <[EMAIL PROTECTED]>
* ToolStripItemCollectionTest.cs: Removed duplicate test.
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TextBoxTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TextBoxTest.cs
2007-05-16 15:33:14 UTC (rev 77483)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TextBoxTest.cs
2007-05-16 15:38:04 UTC (rev 77484)
@@ -690,5 +690,26 @@
_invalidated = 0;
_paint = 0;
}
+
+ [Test]
+ public void MethodIsInputChar ()
+ {
+ // Basically, show that this method always returns true
+ InputCharControl m = new InputCharControl ();
+ bool result = true;
+
+ for (int i = 0; i < 256; i++)
+ result &= m.PublicIsInputChar ((char)i);
+
+ Assert.AreEqual (true, result, "I1");
+ }
+
+ private class InputCharControl : TextBox
+ {
+ public bool PublicIsInputChar (char charCode)
+ {
+ return base.IsInputChar (charCode);
+ }
+ }
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches