Re: Set focus on NSTextField in an NSMenuItem

2022-10-22 Thread Sandor Szatmari via Cocoa-dev
Status items used to be easy… sigh Sandor > On Oct 22, 2022, at 09:37, Richard Charles wrote: > >  >> On Oct 21, 2022, at 8:32 PM, Richard wrote: >> >> In Xcode 13 the Info.plist file is now created automatically using build >> settings. Set "Application is Agent (UIElement)" to Yes.

Re: Set focus on NSTextField in an NSMenuItem

2022-10-21 Thread Sandor Szatmari via Cocoa-dev
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 wrote: > >  >> On Oct 21, 2022,

Re: Set focus on NSTextField in an NSMenuItem

2022-10-21 Thread Sandor Szatmari via Cocoa-dev
Drgan, > > On Oct 21, 2022, at 05:37, Dragan Milić via Cocoa-dev > 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]

Re: Set focus on NSTextField in an NSMenuItem

2022-10-21 Thread Dragan Milić via Cocoa-dev
> 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

Re: Set focus on NSTextField in an NSMenuItem

2022-10-19 Thread Sandor Szatmari via Cocoa-dev
Dragan, > On Oct 19, 2022, at 15:46, Dragan Milić via Cocoa-dev > wrote: > >  >> >> On 19. 10. 2022., at 03:52, Eric Schlegel wrote: >> >> >> I can tell you that the Help menu does itself use makeFirstResponder: on the >> text view… > > Eric, thanks for detailed explanation and

Re: Set focus on NSTextField in an NSMenuItem

2022-10-19 Thread Dragan Milić via Cocoa-dev
> On 19. 10. 2022., at 03:52, Eric Schlegel wrote: > > > I can tell you that the Help menu does itself use makeFirstResponder: on the > text view… Eric, thanks for detailed explanation and willingness to help. Your message triggered me to play with the issue a bit more and I figured out what

Re: Set focus on NSTextField in an NSMenuItem

2022-10-18 Thread Eric Schlegel via Cocoa-dev
> On Oct 18, 2022, at 9:43 AM, Dragan Milić via Cocoa-dev > wrote: > > Hi all, > > I’m developing a tiny application, which has an NSStatusItem instance with a > menu. One for the menu items of the menu has a custom view, which is either > an NSTextField instance, or in can even be an

Re: Set focus on NSTextField in an NSMenuItem

2022-10-18 Thread Dragan Milić via Cocoa-dev
> On 18. 10. 2022., at 19:11, Alex Zavatone wrote: > > I am speaking from an iOS perspective but, is there something like > makeFirstResponder? Yes, there is. It should be sent to an NSWindow instance and I tried to do that in -[NSMenuDelegate menuNeedsUpdate:], or -[NSMenuDelegate

Re: Set focus on NSTextField in an NSMenuItem

2022-10-18 Thread Alex Zavatone via Cocoa-dev
I am speaking from an iOS perspective but, is there something like makeFirstResponder? Sent from my iPhone > On Oct 18, 2022, at 6:44 PM, Dragan Milić via Cocoa-dev > wrote: > > Hi all, > > I’m developing a tiny application, which has an NSStatusItem instance with a > menu. One for the

Set focus on NSTextField in an NSMenuItem

2022-10-18 Thread Dragan Milić via Cocoa-dev
Hi all, I’m developing a tiny application, which has an NSStatusItem instance with a menu. One for the menu items of the menu has a custom view, which is either an NSTextField instance, or in can even be an NSView instance containing the NSTextField instance (the latter approach enables me to