http://bugzilla.novell.com/show_bug.cgi?id=616825

http://bugzilla.novell.com/show_bug.cgi?id=616825#c0


           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: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          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..."
            };

            myAlertView.AddButton("Cancel");
            myAlertView.AddButton("Ok");
            myAlertView.AddSubview(tf);
            myAlertView.Show();


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? 
Everytime

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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to