Phantom Menu Item

I just noticed that my app has a strange new menu item that I did not create and I can find NO reference to in my code.
I am using the Xojo Toolbar, and it seems that directly below this is some type of title/tab bar
and under the VIEW menu there is an entry for “Show Tab Bar”, that has a check visible if this phantom control is visible

  • I did not create such a control, it does not appear anywhere in the IDE controls pane, nor in the Window layout GUI
  • there is no menu entry for it…
  • There is no menuhandler available for it
  • it has the text of “Untitled”, but since there is no such control, I can’t even change that to have any meaning
  • the phrase “Tab Bar” appears no where in my code

It’s the built into Mac OS tab bar. It looks like Apple is shoving it into the View menu the same way they do with the help search bar and Edit > Start Dictation.

Edit: The tab title will inherit from the Window title.

[quote=365460:@Tim Parnell]It’s the built into Mac OS tab bar. It looks like Apple is shoving it into the View menu the same way they do with the help search bar and Edit > Start Dictation.

Edit: The tab title will inherit from the Window title.[/quote]

Or, courtesy of Thomas Templemann, here’s the equivalent Declares:

/ Disable auto tabbing in Sierra
#If TargetCocoa
   Declare Function NSClassFromString Lib "Cocoa" (s As CFStringRef) As Ptr
   Declare Function NSSelectorFromString Lib "Cocoa" (s As CFStringRef) As Ptr
   Declare Sub setAllowsAutomaticWindowTabbing Lib "Cocoa" selector "setAllowsAutomaticWindowTabbing:" (cls As Ptr, ena As Boolean)
   Declare Function respondsToSelector Lib "Cocoa" selector "respondsToSelector:" (p As Ptr, sel As Ptr) As Boolean
   Dim nswCls As Ptr = NSClassFromString ("NSWindow")
   If respondsToSelector (nswCls, NSSelectorFromString ("setAllowsAutomaticWindowTabbing:")) Then
      setAllowsAutomaticWindowTabbing (nswCls, False)
   End if
#EndIf

solves the problem!