[Mono-bugs] [Bug 372264] New: PropertyGrid: MultilineStringEditor doesn' t open with null value

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Mar 19 05:36:26 EDT 2008


           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: contact at i-nz.net
        ReportedBy: andyhume32 at yahoo.co.uk
         QAContact: mono-bugs at lists.ximian.com
          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
                                if (editorService != null)
-                                       if (!(value is string))
+                                       if (!(value is string || value ==
                                                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.

More information about the mono-bugs mailing list