CPTextField's becomeFirstResponder
-
Ross Boucher
- Milestone set to 0.5.2
- Tag changed from appkit, bug to appkit, bug
-
Ross Boucher
- State changed from new to invalid
Alright, the problem here is that you're not supposed to manually call becomeFirstResponder. In order to make a view the first responder, you're supposed to do something like
[myWindow makeFirstResponder:someView];
So, becomeFirstResponder wasn't expecting to be called directly. The reason it doesn't work is that it shouldn't be allowed to be first responder if it isn't editable, and you hadn't made it editable yet.
So, if you make it editable, add it to the window, and after that call:
[[textField window] makeFirstResponder:textField];Then, it should work as expected.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
