ten.textValue = [[NSMutableString alloc]init];
ten.textValue = [NSMutableString stringWithString:textField.text];
I am getting crash at second line.
ten.textValue is NSMutableString.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you create your
ten.textValue = [[NSMutableString alloc]init];you are creating an object that you own.When you try to add a string to it in the next line, you are creating an autoreleased string. This is confusing the compiler, which is reporting “hang on – this is an allocated, owned object already”.
Instead: