Re: Set focus on NSTextField in an NSMenuItem
site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=uX8FnhiqcXHy9v8J/5O4Hj2N1Qo7qI+9mhOl89oTxG8=; b=U8tmQDFSUR8sRHfgGvq7cvKOOTEsOqd+t0ZP6s27qJI4AWfM7gP4NaHfd7cvt/TPc7 4SYc48cG3GSk28uj4A8DH8dqpbIkbakj2NHUGBr205DspaYuZr8okYuFlb2Z7WxdMAXX WADqRizGS451AVp/sBj/RrmfWa5DcFOLjG5eItpVYnkneFygBYBY4q6tCUkWZZGcsIcz tT/WZVBtuw6mD7/aFxoOGeaab5/PVCjn+5Q4UXWThjL2HvoomDKwj4BFk+3mP+22X/NH xOFQJuIqRafmV8irAYzNg7RbyUuKck8c9jMg6eRP+U9o9EA1nhlJ2NCm3n4yWAahXQ2h gB0A== 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 <rsomers124@gmail.com> wrote:
On Oct 21, 2022, at 6:57 AM, Sandor Szatmari via Cocoa-dev <cocoa-dev@lists.apple.com> 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 (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/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Sandor Szatmari via Cocoa-dev