• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: NSStatusItem, Popover and NSTextField make responder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: NSStatusItem, Popover and NSTextField make responder


  • Subject: RE: NSStatusItem, Popover and NSTextField make responder
  • From: Lee Ann Rucker <email@hidden>
  • Date: Fri, 17 Apr 2015 17:45:22 +0000
  • Thread-topic: NSStatusItem, Popover and NSTextField make responder

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=email@hidden [cocoa-dev-bounces+lrucker=email@hidden] on behalf of Alex Kac [email@hidden]
Sent: Friday, April 17, 2015 9:20 AM
To: email@hidden
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 (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

_______________________________________________

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


References: 
 >NSStatusItem, Popover and NSTextField make responder (From: Alex Kac <email@hidden>)

  • Prev by Date: Re: Thousands of leaked CGContext ?
  • Next by Date: Re: Images Being Substituted in UIText .attributedText -- It's an iOS bug
  • Previous by thread: NSStatusItem, Popover and NSTextField make responder
  • Next by thread: Re: Images Being Substituted in UIText .attributedText -- It's an iOS bug
  • Index(es):
    • Date
    • Thread