[Mono-bugs] [Bug 396076] PropertyGrid: ignores set of Padding "All" value

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jun 2 13:45:36 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=396076

User contact at i-nz.net added comment
https://bugzilla.novell.com/show_bug.cgi?id=396076#c5





--- Comment #5 from Ivan Zlatev <contact at i-nz.net>  2008-06-02 11:45:36 MDT ---
Thanks a lot for your work. There are a couple of things that have to be
addressed before this can go in:

1) I have fixed (in HEAD r104697) the PropertyGrid to always pass a
ITypeDescriptorContext (we had this implemented, but were not passing it), that
includes also to TypeConverter.CreateInstance. So now you can use
context.Instance, which will be the current Padding value instance (prior to
the change), to drop the heuristics in CreateInstance and just check whether
["All"] in the dictionary has changed compared ot the value in
context.Instance. Also on a side note in regards to the propertygrid comment in
CreateInstance I wanted to mention that TypeConverters are used by other things
(e.g codedom serialization) not only the proeprty grid.

2) Please merge all the helper test methods in the unit test methods. It will
be much easier to read and follow the code.

3) If you want to test CreateInstance you could create a stub implementation of
ITypeDescriptorContext and set the Instance, then pass it to CreateInstance.

4) Once all of those are done, please add ChangeLog entries and MIT/X11 license
remakrs in them.

5) Something very minor. Please change

if (destinationType == typeof(string))
    return true;

if (destinationType == typeof(InstanceDescriptor))
    return true;

to

if (destinationType == typeof(string))
    return true;
else if (destinationType == typeof(InstanceDescriptor))
    return true;



-- 
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