[Mono-bugs] [Bug 420312] ToolStripCollectionEditor implementation

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Sep 29 11:34:35 EDT 2008


User andyhume32 at yahoo.co.uk added comment

Andy Hume <andyhume32 at yahoo.co.uk> changed:

           What    |Removed                                         |Added
             Status|NEEDINFO                                        |NEW
      Info Provider|andyhume32 at yahoo.co.uk                          |

--- Comment #2 from Andy Hume <andyhume32 at yahoo.co.uk>  2008-09-29 09:34:35 MDT ---
Created an attachment (id=242314)
 --> (https://bugzilla.novell.com/attachment.cgi?id=242314)
Patch #2

Redone.  Hopefully this is as you imagined.  As before, still has debug logging
and not quite per coding standards.

The checking for well-known assemblies seems a bit odd but there seems not
other simple way to get and compare the PublicKeyToken with its well-known

Note that when used by PropertyGrid the debug logging from the constructor is
seen with _every_ scroll of the PG (when showing a object with such an item
collection); which shows that PG is recreating the editor for every action
(when scrolling: to call PaintValue).

I guess this falls into need for more caching that you had highlighted earlier.
 For this case it seems that the editor should only be instantiated *once* by
the GridEntry -- its not something that changes after the object is first
loaded.  So GetEditor should store the value and return it, something like:
                bool doneGetEditor;
                UITypeEditor _editor;

                private UITypeEditor GetEditor ()
                        if (doneGetEditor)
                                return _editor;
                        doneGetEditor = true;

Similarly for GetConverter?

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