[Mono-bugs] [Bug 686486] Mono crashes when setting the DialogResult in the FormClosing event method

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun May 8 07:04:44 EDT 2011



Thomas Goldstein <stifu at free.fr> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #6 from Thomas Goldstein <stifu at free.fr> 2011-05-08 11:04:42 UTC ---
Alright, thank you. I pushed the fix to master.

You were right, I was confused earlier between Closing and Closed. Thought that
variable had to be true when FireClosedEvents was called.

About the unit test, I don't know whether it's a good practice or not to
explicitly call Assert.Fail, considering exceptions automatically result in a
fail anyway. So maybe we could just remove the try / catch and let it fail
naturally, regardless of the exception type thrown. I guess it'd be more simple
and general this way. *shrugs*
I know it doesn't matter much in the end, but I'd like to learn and follow best
practices if there are any. If no one has an opinion on this, I'll just push
the unit test as is later on.

By the way, while checking this bug out, I noticed a difference between .NET
and Mono... If you add an instruction after the ShowDialog call, like a message
box, with .NET, it'll be shown right after the form is shown, while with Mono,
it won't be shown until you close the form.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list