• 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 08:57:05 -0400

Drgan,

>
> On Oct 21, 2022, at 05:37, Dragan Milić via Cocoa-dev
> <email@hidden> wrote:
>
> 
>> On 20. 10. 2022., at 01:22, Sandor Szatmari wrote:
>> I have a status item and in order to get it to show I have to call this in
>> my code that orders in the view/window
>> [[NSApplication sharedApplication] activateIgnoringOtherApps:YES]
>> I have no idea if this is the best way to accomplish this, but it works for
>> me…
>
>
>> On 21. 10. 2022., at 04:49, Richard Charles <email@hidden> wrote:
>> In a macOS document based application I added a menu item to a submenu and
>> set the view of the menu item to a NSTextField. This was done using
>> Interface Builder. It works just fine.
>
> Sandor, Richard… I know guys… Please read my latest reply in this thread and
> the explanation why I couldn’t set the focus on a text field inside a menu.

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.

Sandor

>
>
> -- Dragan
> _______________________________________________
>
> 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: 
 >Re: Set focus on NSTextField in an NSMenuItem (From: Dragan Milić via Cocoa-dev <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