Can anyone tell me if the information below is still an issue? We do have events defined that do not have these two parameters.
Thanks.
Jim
ID: P157003 Title: "RaiseEvent statement in .NET User Control causes JIT error in ABL" | |
Created: 12/07/2009 | Last Modified: 04/19/2010 |
Status: Unverified | |
Symptoms: · RaiseEvent statement in .NET User Control causes JIT error in ABL · System.InvalidProgramException: JIT Compiler encountered an internal limitation. · .NET StackTrace: --> at testnetcontrolTestNETControlButtonClickedReceiver.OnButtonClicked() at testnetcontrol.TestNETControl.Button1_Click(Object sender, EventArgs e) in TestNETControl.vb:line 5 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) · Code for .NET User Control: Public Class TestNETControl Public Event ButtonClicked() Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click RaiseEvent ButtonClicked() End Sub End Class | |
Facts: · User Control works as expected in Visual Studio · User Control Button1_Click event works as expected once the RaiseEvent statement has been removed · OpenEdge 10.2A · OpenEdge 10.2B · Windows | |
Cause: · The ABL does not support .NET events that do not have the two standard parameters: ByVal sender As Object, ByVal e As System.EventArgs When we subscribe to the event in the ABL, we have to emit a real subscriber in .NET for the control to call, which then calls back to the ABL. We generate this with the 2 standard parameters. |
Jim,
OpenEdge still does not support .NET events unless the signature conforms to the "convention" of having 2 parameters, with the 1st one a System.Object and the 2nd one derived from System.EventArgs. With 10.2B, OE now supports ABL class events, which do not have that same restriction.
-- Wayne
Wayne,
Thanks. Answers the question perfectly!
Jim
Hello Wayne,
When do you think this issue will be resolved?
Hello Kristof,
Unfortunately, I can't give you an estimate of when we will add this support. It is on our list of enhancements for the future, but is not scheduled for OpenEdge 11.0.
--Wayne