• 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: Set focus on NSTextField in an NSMenuItem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Set focus on NSTextField in an NSMenuItem


  • Subject: Re: Set focus on NSTextField in an NSMenuItem
  • From: Sandor Szatmari via Cocoa-dev <email@hidden>
  • Date: Fri, 21 Oct 2022 17:01:45 -0400

Try observing mouse events and calling

[NSApplication activateIgnoringOtherApps:YES]

In the mouse down event… that works for me… see Dragan’s plist settings for the
correct way to remove from Dock et all…


Sandor
> On Oct 21, 2022, at 15:44, Richard Charles <email@hidden> wrote:
>
> 
>> On Oct 21, 2022, at 6:57 AM, Sandor Szatmari via Cocoa-dev
>> <email@hidden> wrote:
>>
>> Understood.  I DON’t get the behavior your seeing where the menu closes.
>> Perhaps because I’m calling it from a different point in code.  I am calling
>> [NSApplication activateIgnoringOtherApps:YES] in my listener/observer to the
>> mouseDown action.
>
>
> I made a test MenuBarApp. To get the main menu of the app to not show I had
> to hide the running app. But when the app is hidden, the text field in the
> menu of a status bar item will not accept responder events.
>
> Perhaps you should try using a text field in a popover like spotlight search.
>
> Richard
>
_______________________________________________

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

  • Prev by Date: Re: Set focus on NSTextField in an NSMenuItem
  • Next by Date: Re: Set focus on NSTextField in an NSMenuItem
  • Previous by thread: Re: Set focus on NSTextField in an NSMenuItem
  • Next by thread: Re: Set focus on NSTextField in an NSMenuItem
  • Index(es):
    • Date
    • Thread