Modal panel and -initialFirstResponder
Modal panel and -initialFirstResponder
- Subject: Modal panel and -initialFirstResponder
- From: Vincent <email@hidden>
- Date: Wed, 20 Jul 2011 08:28:06 +0200
Hi again,
I’m puzzled by what I think is a very basic Cocoa feature that still escapes my knowledge (and I found nothing really meaningful about it).
More specifically, I have a NSPanel, with some NSTextField inside, and would like the editing to begin immediately in the first text field when the panel appears. I thus set the initialFirstResponder outlet to the field I’d like the edition to start in. But when the panel shows (modally), all the fields are inactive: I have to explicitly select one of them by clicking.
I’ve tried to call -setFirstResponder: with my NSTextField as parameter (or even -[myTextField performClick:]) inside the -didBecomeKey delegate methods, to no avail.
Has someone an idea on how to make the cursor initially appear without having to click on a text field?
Thanks!
Vincent_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden