[MonoTouch] Attempting to JIT compile method... what am I doing wrong?

slodge me at slodge.com
Wed Mar 21 16:34:30 UTC 2012


I've got this code currently which is failing because of a JIT error.

var u = new UIButton();
var t =u.GetType().GetEvent("TouchDown");
t.AddEventHandler(u, new System.EventHandler((object b, System.EventArgs
args) => {}));

The exception message is:        			
// Attempting to JIT compile method '(wrapper delegate-invoke)
<Module>:invoke_void__this___UIControl_EventHandler
(MonoTouch.UIKit.UIControl,System.EventHandler)' while running with
--aot-only.

I've tried setting link to none, and I've tried adding a static:
u.TouchDown += (sender, e) => { /* ignored */ };

but that hasn't helped.

What	else can I try?

All suggestions welcome!

Thanks

Stuart


--
View this message in context: http://monotouch.2284126.n4.nabble.com/Attempting-to-JIT-compile-method-what-am-I-doing-wrong-tp4492918p4492918.html
Sent from the MonoTouch mailing list archive at Nabble.com.


More information about the MonoTouch mailing list