[MonoTouch] Problem with UIBarButtonItem

joergsc joerg at schanko.com
Tue Dec 13 04:43:14 EST 2011


I'm updating an older project now with MonoTouch 5.0.3 and MonoDevelop
2.8.4.2.
Everything works - except UIBarButtonItems.
In XCode, the .h file looks like:

@interface vcTimerChoose : UIViewController {
	
	UITableView *_myTableView;
	
}

@property (retain, nonatomic) IBOutlet UIBarButtonItem *BarButton;

@property (nonatomic, retain) IBOutlet UITableView *myTableView;

- (IBAction)BarButton_Click:(id)sender;
@end

(pretty much the same as in the older VC in my project), but it doesn't
work.
When I try to compile the project
partial void BarButton_Click (MonoTouch.UIKit.UIBarButtonItem sender)
gives a "A partial method
'ShoCoIP.vcTimerChoose.BarButton_Click((MonoTouch.UIKit.UIBarButtonItem)'
implementation is missing a partial declaration" error and
BarButton.Title=NSBundle.MainBundle.LocalizedString("Settings","Timer
Settings");
throws a "System.NullReferenceException: Object reference not set to an
instance of an object" exception, though the exct same code works in other
viewController in the same project (created with an older version of
MonoTouch).

Any idea???
Thx, Jörg


--
View this message in context: http://monotouch.2284126.n4.nabble.com/Problem-with-UIBarButtonItem-tp4189717p4189717.html
Sent from the MonoTouch mailing list archive at Nabble.com.


More information about the MonoTouch mailing list