> 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 menuWillOpen:] (in 
both cases after some delay, as the window of the text field  is still set at 
the time those delegate messages are received) and I also subclassed NSTextView 
and tried to call -[[self window] makeFirstResponder:self] in overridden 
-[NSView viewDidMoveToWindow] method, but those calls have no effect. Even if 
it worked, it’d still be a problem setting the focus on the text field by 
clicking on it.

-- Dragan
_______________________________________________

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

Reply via email to