DatePicker views have to be placed in PopupControllers, I believe. That's
how I'm using one now and I'm not suffering from this problem. I can grab
some code later to demonstrate.
That said, I'm pretty new at this and have never used an InputView before (I
do the plumbing myself) and perhaps there's something else going on?
On Tue, Jun 21, 2011 at 7:00 PM, vbisbest [via MonoTouch] <
[email protected]> wrote:
> Hi, I have created a view controller that has a date picker and a button
> that says "Select". When a user click in the "Date" field, I set the
> InputView to my DatePickerView. My date picker view slides up and look
> great.
>
> Main.cs
> partial void pickDateFrom (UITextField sender)
> {
> textDateFrom.InputView = datePickerView.View;
> }
>
> The problem is when I click my "Select" button on the date picker view, the
> app crashes. This is without any code, just hooking up the outlet to
> TouchUpInside crashes the app.
>
> Perhaps I am approaching this the wrong way to pick a date or there is
> something I am missing. Any help would be appreciated. Thanks.
>
> Error:
> 2011-06-21 18:57:27.040 BMA[3794:207] -[DatePickerView dateSelected:]:
> unrecognized selector sent to instance 0x717b2b0
>
> Unhandled Exception: MonoTouch.Foundation.MonoTouchException: Objective-C
> exception thrown. Name: NSInvalidArgumentException Reason: -[DatePickerView
> dateSelected:]: unrecognized selector sent to instance 0x717b2b0
> at (wrapper managed-to-native)
> MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
>
> at MonoTouch.UIKit.UIApplication.Main (System.String[] args,
> System.String principalClassName, System.String delegateClassName) [0x00038]
> in /Users/plasma/Source/iphone/monotouch/UIKit/UIApplication.cs:26
> at MonoTouch.UIKit.UIApplication.Main (System.String[] args) [0x00000] in
> /Users/plasma/Source/iphone/monotouch/UIKit/UIApplication.cs:31
> at BMA.Application.Main (System.String[] args) [0x00000] in
> /Users/vbisbest/Projects/BMA/BMA/Main.cs:17
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://monotouch.2284126.n4.nabble.com/Crash-with-InputView-on-UITextField-tp3615597p3615597.html
> To start a new topic under MonoTouch, email
> [email protected]
> To unsubscribe from MonoTouch, click
> here<http://monotouch.2284126.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3346893&code=YnJpYW5AYWxwaGNlLmNvbXwzMzQ2ODkzfDU2ODcyMzk0Ng==>.
>
>
--
Brian Schuth
ALPHCE, Inc.
Eastport, ME
+1 207 370 2430
[email protected]
--
View this message in context:
http://monotouch.2284126.n4.nabble.com/Crash-with-InputView-on-UITextField-tp3615597p3616529.html
Sent from the MonoTouch mailing list archive at Nabble.com._______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch