[MonoTouch] SIGSEGV Error when tapping a button?

dermotos me at dermotos.com
Tue Dec 20 02:47:49 EST 2011


Thanks for the replies guys. Im a little bit further on this issue. If I
remove all the code from the button's method, when I press the button I get:


When using an Action (Partial method)
-[UITouch onBtnImageTouchUpInside:]: unrecognized selector sent to instance
0x6cc96a0

When using an Outlet and wiring a c# event handler in the ViewDidLoad():
-[__NSCFSet BridgeSelector]: unrecognized selector sent to instance
0x6b41450


If I, however, create a UIButton variable at the class level, and in my
ViewDidLoad set it as a reference to the original button (created in
Interface Builder), the problem goes away. So it looks like the button is
being garbage collected, even though it has been declared at class level in
the designer.cs file:

[Register ("EditorTableCell")]
	partial class EditorTableCell
	{
		[Outlet]
		MonoTouch.UIKit.UITextField txtTextField { get; set; }

		[Outlet]
		MonoTouch.UIKit.UIButton btnFacebook { get; set; }

		[Outlet]
		MonoTouch.UIKit.UIButton btnImage { get; set; } //This button is the
problem.
	}


Is this a bug in the Monotouch framework? Why is it going out of scope/being
GC'd?

--
View this message in context: http://monotouch.2284126.n4.nabble.com/SIGSEGV-Error-when-tapping-a-button-tp4213187p4216934.html
Sent from the MonoTouch mailing list archive at Nabble.com.


More information about the MonoTouch mailing list