[Mono-bugs] [Bug 616825] New: ResignFirstResponder() for UITextField in UIAlertView crashes app without error

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jun 23 14:47:58 EDT 2010



           Summary: ResignFirstResponder() for UITextField in UIAlertView
                    crashes app without error
    Classification: Mono
           Product: MonoTouch
           Version: unspecified
          Platform: Macintosh
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: zack.payton at executiveinstruments.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Community User
           Blocker: ---

Created an attachment (id=371280)
 --> (http://bugzilla.novell.com/attachment.cgi?id=371280)
UIAlertView TextBox first responder crash

Description of Problem:
When creating a custom UIAlertView that has a text field to collect some
information, ResignFirstResponder is used in the text fields ShouldReturn
callback.  This causes the app to exit without any message at all.

Steps to reproduce the problem:
            UITextField tf = new UITextField(new System.Drawing.RectangleF
                                             (12f, 45f, 260f, 25f));
            tf.BackgroundColor = UIColor.White;
            tf.UserInteractionEnabled = true;

            /***** This is what causes the crash *****/
            tf.ShouldReturn = (x) => {
                x.ResignFirstResponder ();
                return true;

            //tf.ShouldReturn = DoReturn;

            UIAlertView myAlertView = new UIAlertView
                Title = "Give the text box focus",
                Message = "This should be hidden..."


Actual Results:
Application exits without warning when selecting the text box.

Expected Results:
Alert Dialogue appears that allows users to enter text and when they select
return on the keyboard, the keyboard should disappear.

How often does this happen? 

Additional Information:

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list