https://bugzilla.novell.com/show_bug.cgi?id=372264
Summary: PropertyGrid: MultilineStringEditor doesn't open with
null value
Product: Mono: Class Libraries
Version: 1.9.0
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
Created an attachment (id=202873)
--> (https://bugzilla.novell.com/attachment.cgi?id=202873)
Repro code
A property with [Editor(MultilineStringEditor)] and with null value: the edit
drop-down arrow appears but the editor doesn't appear when it's clicked. Type
some text into the field, confirm the edit -- hit return, or click in another
field and back, etc -- and hit the drop-down again, the editor now will appear.
Repro attached, property "FooStringMultilineEditor".
Fix is:
[[
Index: MultilineStringEditor.cs
===================================================================
--- MultilineStringEditor.cs (revision 97663)
+++ MultilineStringEditor.cs (working copy)
@@ -69,7 +69,7 @@
editorService =
(IWindowsFormsEditorService)provider.GetService (typeof
(IWindowsFormsEditorService));
if (editorService != null)
{
- if (!(value is string))
+ if (!(value is string || value ==
null))
return value;
editContent = value as string;
]]
Note that results in null being returned as String.Empty when no change is
made, but that matches MSFT -- and good properties don't return null anyway.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs