[MonoTouch] Attempting to JIT compile method... what am I doing wrong?
Nic Wise
nicw at fastchicken.co.nz
Wed Mar 21 16:42:44 UTC 2012
Whats wrong with
var u = new UIButton();
u.TouchDown += (btn, evt) => {
};
??
as you dont directly refer to TouchDown, it's most likely stripped by
the linker.
On Wed, Mar 21, 2012 at 16:34, slodge <me at slodge.com> wrote:
> 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.
> _______________________________________________
> MonoTouch mailing list
> MonoTouch at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch
--
Nic Wise
t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/
Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
mobileAgent (for FreeAgent): get your accounts in your pocket.
http://goo.gl/IuBU
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2
More information about the MonoTouch
mailing list