[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pnet-developers] [bugs #7265] compiler does not find error, runtime pri
From: |
anonymous |
Subject: |
[Pnet-developers] [bugs #7265] compiler does not find error, runtime prints strange message |
Date: |
Thu, 15 Jan 2004 00:54:49 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030915 Galeon/1.3.11a |
This mail is an automated notification from the bugs tracker
of the project: DotGNU Portable.NET.
/**************************************************************************/
[bugs #7265] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=7265>
Project: DotGNU Portable.NET
Submitted by: 0
On: Thu 01/15/04 at 05:54
Category: None
Severity: 5 - Average
Item Group: None
Resolution: None
Assigned to: None
Status: Open
Summary: compiler does not find error, runtime prints strange message
Original Submission: If you add a handler for an event to a widget, and that
handler has the wrong signature, the compiler blithely continues.
The eroneous code assigned to Click using += new EventHandler(handler), but
the signature of the handler is (object, PaintEventArgs)
When the program is run by ilrun, this message appears: EditWindow::.ctor
[2129] - call at verify_call.c:1089
Uncaught exception: System.Security.VerificationException: Could not verify the
code
at CqlJournal.EditWindow.Main(String[])
Code to produce this error:
TextBox tb = new TextBox();
tb.Click += new EventHandler(myHandler);
.
.
.
But, myHandler is not of type EventHandler. The method that produced the error
pasted above is:
private void myHandler(object obj, PaintEventArgs args)
{
...
}
File Attachments
-------------------
-------------------------------------------------------
Date: Thu 01/15/04 at 05:54 Name: EditWindow.cs Size: 2KB By: None
file that demonstrates the problem. It isn't the simplest possible case, but I
included it because (1) it produces the error I pasted and (2) I was feeling to
lazy to make a separate test case file.
http://savannah.gnu.org/bugs/download.php?item_id=7265&item_file_id=958
For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=7265>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Pnet-developers] [bugs #7265] compiler does not find error, runtime prints strange message,
anonymous <=