It's because your UITextField object is somehow assigned to a variable/property which is not supposed to be a UITextField.
It can happen in many different ways.
- You might have connected the IB outlet incorrectly. Check your nib in the Interface Builder to see your
UITextFieldis not connected to something strange. - You might have just assigned an
UITextFieldto a variable of a different type. In that case, the compiler should have given you a warning. Correct your code and remove all the warnings. - You might have not correctly done
retain/release. Do "build and analyze", and remove all warnings.
Yuji
2010-07-27 00:07:23