[Mono-bugs] [Bug 362112] New: PropertyGrid: blank Char property field contains a null char
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Feb 15 06:17:19 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=362112
Summary: PropertyGrid: blank Char property field contains a null
char
Product: Mono: Class Libraries
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: andyhume32 at yahoo.co.uk
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=195102)
--> (https://bugzilla.novell.com/attachment.cgi?id=195102)
Repro code
When editing an uninitialised Char property the text field initially contains a
(generally invisible!) null character. The field should be empty in that case.
To repro, run the attached code which has a property of type char, click in it
and type 'a' (without the quotes), confirm the edit (hit return, etc), and see
error "...value 'a ' is not...", note the two chars in the quotes. (On some
systems the null character is visible as a square etc).
This is actually a flaw in the CharTypeConverter, see the test case below which
passes on MSFT:
[Test]
public void NullChar()
{
TypeConverter tc = new CharConverter ();
Char input = (char)0;
String str = (String)tc.ConvertTo (input, typeof (String));
Assert.IsNotNull (str, "1-not null");
Assert.AreEqual (0, str.Length, "2-empty");
}
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list