[Mono-bugs] [Bug 334244] New: Form. CheckAcceptButton throws nullref with non-standard button
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Oct 16 08:10:00 EDT 2007
https://bugzilla.novell.com/show_bug.cgi?id=334244
Summary: Form.CheckAcceptButton throws nullref with non-standard
button
Product: Mono: Class Libraries
Version: 1.2
Platform: i686
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: mono-bugs at ximian.com
ReportedBy: dsuarezv at codice.es
QAContact: mono-bugs at ximian.com
Found By: ---
Using a set of non-standard button classes I have found an issue in the
Form.AcceptButton method. Problem is with this piece of code:
internal override void CheckAcceptButton()
{
if (accept_button != null) {
Button a_button = accept_button as Button;
if (ActiveControl == a_button)
return;
if (ActiveControl is Button) {
a_button.paint_as_acceptbutton = false;
a_button.Invalidate();
return;
} else {
a_button.paint_as_acceptbutton = true;
a_button.Invalidate();
}
}
}
While accept_button is defined in MSDN as IButtonControl, here it is casted to
Button. The result is that a form with an non-standard Button in the
acceptbutton property throws a nullref.
--
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