2007-08-24

Not a day without a bug - ContextMenuStrip appears after second click

A hot flood happens on rsdn - Property in С# - is it bad or good.

Here is a bug to piggy bank of opponents of syntactic sugar:

If in ContextMenuStrip initially there are no elements and during handling event Opening add an element but do not set e.Cancel = false then on the first click menu will not appear.

And this is in spite of e.Cancel is set to false by default. Exactly this stupid row in the sample from Microsoft is tend to be ignored by many people.

P.S. Yesterday there was a bug also, but it was in Spring.Net 1.1 M2. The version number and open source allows to close one's eyes to it...

Update 29.08.2007 By hook or by crook: A small sample how to by means of a couple of strings of code and a small helper class to test properties behavior.

No comments:

Post a Comment