[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: |
Rhys Weatherley |
Subject: |
[Pnet-developers] [bugs #7265] compiler does not find error, runtime prints strange message |
Date: |
Thu, 22 Jan 2004 00:21:13 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 |
This mail is an automated notification from the bugs tracker
of the project: DotGNU Portable.NET.
/**************************************************************************/
[bugs #7265] Latest Modifications:
Changes by:
Rhys Weatherley <address@hidden>
'Date:
Thu 01/22/04 at 05:21 (GMT)
What | Removed | Added
---------------------------------------------------------------------------
Resolution | None | Works for me
Status | Open | Closed
------------------ Additional Follow-up Comments ----------------------------
When I use the simple test case in your description,
I get the following error from cscc, which is what
I would expect:
click.cs:9: delegate expression is not compatible with `System.EventHandler'
I cannot build your EditWindow.cs example because it relies
upon classes that you did not supply (e.g. MForm). Please
create a better test case and open a new bug if you are
still having problems. But I am unable to replicate the
problem that was reported with the CVS version of pnet.
/**************************************************************************/
[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: Works for me
Assigned to: None
Status: Closed
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)
{
...
}
Follow-up Comments
------------------
-------------------------------------------------------
Date: Thu 01/22/04 at 05:21 By: rweather
When I use the simple test case in your description,
I get the following error from cscc, which is what
I would expect:
click.cs:9: delegate expression is not compatible with `System.EventHandler'
I cannot build your EditWindow.cs example because it relies
upon classes that you did not supply (e.g. MForm). Please
create a better test case and open a new bug if you are
still having problems. But I am unable to replicate the
problem that was reported with the CVS version of pnet.
-------------------------------------------------------
Date: Thu 01/15/04 at 05:57 By: None
Sorry, the file I attached got fat fingered when I copied it over. The line
with an error should be...
tbox.Click += new EventHandler(testHandler);
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/