[MonoTouch] Actions do not work ("Could not parse expression'[Action ("btn_Start_Click:")]')

joergsc joerg at schanko.com
Wed Dec 14 03:36:09 EST 2011


Hi!

I have an updated project (from Xcode 3 to Xcode 4.2.1). When I create a new
ViewController and define a button on this(with outlet and action) it does
not work.
I tried: 
this.btn_Start.TouchUpInside+=(sender,e)=>{....} in ViedDidLoad as well as 
partial void btn_Start_Click (UIButton sender)
But when you click the button, nothing happens - not even an error message.
There is an Outlet and an Action in the .designer.cs file:
[Outlet]
MonoTouch.UIKit.UIButton btn_Start { get; set; }

[Action ("btn_Start_Click:")]
partial void btn_Start_Click (MonoTouch.UIKit.UIButton sender);

I set a breakpoint and when I hover over the Action in the designer file,
the message-bubble says:
"Could not parse expression'[Action ("btn_Start_Click:")]'

when I hover over this.btn_Start.TouchUpInside+= the bubble says: 'Unknown
member:'TouchUpInside'

I have now idea, what I made / goes wrong.
Any ideas?
Thx, Jörg

--
View this message in context: http://monotouch.2284126.n4.nabble.com/Actions-do-not-work-Could-not-parse-expression-Action-btn-Start-Click-tp4194092p4194092.html
Sent from the MonoTouch mailing list archive at Nabble.com.


More information about the MonoTouch mailing list