Unrecognized selector sent?
I've been mucking around with MonoTouch and the Xcode interface builder from some sample code which had an interface defined already.
After adding a button and giving it a click callback I found one of the buttons was no longer responding to clicks and instead crashing out:
2011-09-30 01:51:35.361 RedLaserSample[19437:707] -[RLSampleViewControll开发者_StackOverflow中文版er scanPressed]: unrecognized selector sent to instance 0x17e1260 MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[RLSampleViewController scanPressed]: unrecognized selector sent to instance 0x17e1260 at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00000] in :0 at RedLaserSample.Application.Main (System.String[] args) [0x00000] in /Users/dev/Desktop/chrisbranson-RedLaserSample-0311fa6/RedLaserSample/Main.cs:28
Any ideas what could be causing this and how I could fix it?
Solved it, for some reason I had to re-add the click event in the Xcode builder.. perhaps the project being built with an older version of mono broke itself when a newer way of adding button callbacks was added in?
精彩评论