Reputation: 329
I started a new MonoTouch project. I opened the Interface Builder and created a button and outlet. I hooked up the button to the outlet. I saved the XIB then went back to MonoDevelop and attempted to build the project. I am getting errors in the generated XIB Designer file. The errors are:
Error CS1502: The best overloaded method match for `MonoTouch.Foundation.NSObject.SetNativeField(string, MonoTouch.Foundation.NSObject)' has some invalid arguments (CS1502) (Test2) Error CS1503: Argument `#2' cannot convert `object' expression to type `MonoTouch.Foundation.NSObject' (CS1503) (Test2)
This is the property is created:
#pragma warning disable 0169
[MonoTouch.Foundation.Connect("window")]
private object window {
get {
this.__mt_window = ((object)(this.GetNativeField("window")));
return this.__mt_window;
}
set {
this.__mt_window = value;
this.SetNativeField("window", value);
}
}
Any ideas?
Upvotes: 2
Views: 900
Reputation: 268255
Make sure you're using the most recent (and matching) versions of the tools.
For example, MonoTouch installation page lists the following requirements for the most recent version:
- XCode 3.2.6 and iOS 4.3 SDK
- Mono framework 2.10.3 for Mac OS X - Intel Runtime
- MonoDevelop IDE 2.4.2 or above
Upvotes: 1