<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Panel Submenus show MacOS system services]]></title><description><![CDATA[<p dir="auto">Some Panels show the MacOS "AutoFill" service at the bottom of the hamburger Submenu.<br />
Not consistently, and not everywhere.<br />
It seems to depend on whether an input field in the panel has focus - which makes sense...</p>
<p dir="auto">Not a big deal, but seldomly relevant.</p>
<p dir="auto">BR/ Lars Herold</p>
<p dir="auto">VS 1.2.030<br />
Mac mini M2 Pro<br />
Mac OS Sonoma 14.5</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1719054909228-panel_submenu_autofill.png" alt="0_1719054908326_Panel_Submenu_AutoFill.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://www.vectorstyler.com/forum/topic/4416/panel-submenus-show-macos-system-services</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 05:18:12 GMT</lastBuildDate><atom:link href="https://www.vectorstyler.com/forum/topic/4416.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 22 Jun 2024 11:15:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Panel Submenus show MacOS system services on Sat, 22 Jun 2024 13:01:02 GMT]]></title><description><![CDATA[<p dir="auto">A robot friend says this - may help, may not:</p>
<p dir="auto">To fix unexpected autofill or contacts in macOS context menus using C++ and Objective-C++, check these areas:</p>
<ol>
<li>
<p dir="auto"><strong>Context Menu Implementation:</strong></p>
<ul>
<li>Ensure menus only show relevant items for the context.</li>
</ul>
</li>
<li>
<p dir="auto"><strong>Event Handling:</strong></p>
<ul>
<li>Verify correct handling of right-click events.</li>
</ul>
</li>
<li>
<p dir="auto"><strong>Input Field Attributes:</strong></p>
<ul>
<li>Disable unwanted autofill attributes (e.g., <code>autocomplete="off"</code>).</li>
</ul>
</li>
<li>
<p dir="auto"><strong>Custom Menu Items:</strong></p>
<ul>
<li>Remove unwanted system items and ensure custom items are properly defined.</li>
</ul>
</li>
<li>
<p dir="auto"><strong>Debugging and Logging:</strong></p>
<ul>
<li>Add logs to trace unwanted menu additions.</li>
<li>Use <code>Xcode Instruments</code> for profiling.</li>
</ul>
</li>
<li>
<p dir="auto"><strong>Frameworks and Libraries:</strong></p>
<ul>
<li>Check third-party libraries for side effects.</li>
<li>Update to latest versions.</li>
</ul>
</li>
</ol>
<p dir="auto">Here is an example of how to implement a context menu in C++ with Objective-C++:</p>
<pre><code class="language-cpp"></code></pre>
<p dir="auto">// ViewController.h<br />
#import &lt;Cocoa/Cocoa.h&gt;</p>
<p dir="auto">@interface ViewController : NSViewController &lt;NSMenuDelegate&gt;<br />
@end</p>
<p dir="auto">// <a href="http://ViewController.mm" rel="nofollow ugc">ViewController.mm</a><br />
#import "ViewController.h"</p>
<p dir="auto">@implementation ViewController</p>
<ul>
<li>
<p dir="auto">(void)viewDidLoad {<br />
[super viewDidLoad];</p>
<p dir="auto">NSMenu *menu = &lsqb;&lsqb;NSMenu alloc] initWithTitle:@"Context Menu"];<br />
[menu setDelegate:self];</p>
<p dir="auto">NSMenuItem *menuItem = &lsqb;&lsqb;NSMenuItem alloc] initWithTitle:@"Custom Action"<br />
action:@selector(customAction)<br />
keyEquivalent:@""];<br />
[menu addItem:menuItem];</p>
<p dir="auto">[self.view setMenu:menu];<br />
}</p>
</li>
<li>
<p dir="auto">(void)customAction {<br />
// Handle custom action<br />
}</p>
</li>
<li>
<p dir="auto">(void)menuNeedsUpdate:(NSMenu *)menu {<br />
[menu removeAllItems];<br />
NSMenuItem *menuItem = &lsqb;&lsqb;NSMenuItem alloc] initWithTitle:@"Dynamic Action"<br />
action:@selector(customAction)<br />
keyEquivalent:@""];<br />
[menu addItem:menuItem];<br />
}</p>
</li>
</ul>
<p dir="auto">@end</p>
<p dir="auto">// main.cpp<br />
#include &lt;Cocoa/Cocoa.h&gt;</p>
<p dir="auto">int main(int argc, const char * argv[]) {<br />
return NSApplicationMain(argc, argv);<br />
}</p>
<pre><code></code></pre>
<p dir="auto">In this example, <code>ViewController</code> implements the <code>NSMenuDelegate</code> protocol to dynamically update the context menu. The <code>menuNeedsUpdate:</code> method ensures that the context menu only contains relevant items. This example combines C++ (in <code>main.cpp</code>) with Objective-C++ (in <code>ViewController.mm</code>), which is commonly used in macOS development.</p>
]]></description><link>https://www.vectorstyler.com/forum/post/25924</link><guid isPermaLink="true">https://www.vectorstyler.com/forum/post/25924</guid><dc:creator><![CDATA[Ingolf]]></dc:creator><pubDate>Sat, 22 Jun 2024 13:01:02 GMT</pubDate></item><item><title><![CDATA[Reply to Panel Submenus show MacOS system services on Sat, 22 Jun 2024 11:42:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/vectorstyler" aria-label="Profile: VectorStyler">@<bdi>VectorStyler</bdi></a> Yes, I'm not a coder, but it may be an API-feature of sorts.<br />
Previously only a Safari thing, but now available in most/all desktop apps in the Edit menu, active when the caret is placed in an input field.. Lets you pick and enter name, address and so on from contacts or enter passwords from the keychain.</p>
<p dir="auto">BR Lars Herold</p>
]]></description><link>https://www.vectorstyler.com/forum/post/25923</link><guid isPermaLink="true">https://www.vectorstyler.com/forum/post/25923</guid><dc:creator><![CDATA[larsherold]]></dc:creator><pubDate>Sat, 22 Jun 2024 11:42:59 GMT</pubDate></item><item><title><![CDATA[Reply to Panel Submenus show MacOS system services on Sat, 22 Jun 2024 11:19:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/larsherold" aria-label="Profile: larsherold">@<bdi>larsherold</bdi></a> Interesting, this seems to be something added by MacOS automatically (maybe an accessibility feature).<br />
I will open a bug on this, to try to find out more.</p>
]]></description><link>https://www.vectorstyler.com/forum/post/25922</link><guid isPermaLink="true">https://www.vectorstyler.com/forum/post/25922</guid><dc:creator><![CDATA[VectorStyler]]></dc:creator><pubDate>Sat, 22 Jun 2024 11:19:09 GMT</pubDate></item></channel></rss>