It's just not possible. When you're in the runloop to track the menu (or presumably popover, though I haven't tried that) [NSApp isActive] is NO, activateIgnoringOtherApps has no effect, so there's no keyWindow and the textfield needs to be in a keyWindow to become firstResponder. I have done everything I can think of - performSelector...afterDelay, dug down into Carbon Events and Event Taps, and filed radars on it.
We get it to work by using a window instead of a menu, but that has its own problems - in fullscreen the menubar assumes it's free to slide back up because there's no visible menu, the button won't stay highlighted because there's no menu, etc. ________________________________________ From: cocoa-dev-bounces+lrucker=vmware....@lists.apple.com [cocoa-dev-bounces+lrucker=vmware....@lists.apple.com] on behalf of Alex Kac [a...@webis.net] Sent: Friday, April 17, 2015 9:20 AM To: cocoa-dev@lists.apple.com Subject: NSStatusItem, Popover and NSTextField make responder I have a popover that is opened on tapping a menu status item. In the popover I have a text field that I’d like to have become active when the popover is open. When the app is in the foreground and you tap on the status item it does become active. When its in the background, it does not. In beta, we’re getting reports from users that they are expecting it to and other apps do. Now I’ve been in the iOS world for a few years and the OS X world only a few months, but I used to work in what is now Carbon and I’ve been lurking here for years so I’ve got a few ideas, but so far none of them are working. I’d love to hear some tips if you have any. I thought it was something with run-loop modes but I haven’t had any luck with that. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/lrucker%40vmware.com This email sent to lruc...@vmware.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com