Two title bars? - Mac OS X

I’m developing an application on OS X, and am running into a challenging problem. My main window opens up with two title bars. It almost looks like I have the main window, then a child window. Note that this is OS X and not Windows, so there is not a MDI option. Window type is a Document. I’ve searched for an answer with no luck. Please see attached Image. Thanks. Gary 4/2017.

online safety pics

What version of Xojo and what version of Mac OS?

Check out the System Preferences > Dock that you have ‘Prefer tabs when opening documents’ set as ‘In Full Screen Only’.

Thanks for the replies Bob and David. Still haven’t solved this yet. I wonder if it was something that happened in latest Mac OS update. I’m on a MacBook Pro running Sierra version 10.12.4 (latest version as of April 18, 2017).

David, I did check the ‘Prefer tabs’ setting in Mac OS preferences. It is set to ‘In Full Screen Only’. Still have the problem.

By the way I’m set to a single title bar when I create a simple ‘Hello World’ program.

Here are some of the Property List settings for the main window. Interfaces AS string; super AS string; Frame AS integer; title AS string; fullscreenbutton AS false; implicit instance AS TRUE

It still sounds like Sierra’s auto-tabbing.

If you’ve the MBS plugins, try this:

// I use this in App.open if SystemInformationMBS.isSierra then NSWindowMBS.allowsAutomaticWindowTabbing = false end if

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 #endif

Gavin! Thank you so much. That solved the problem. It was indeed a problem with Sierra and auto tabbing.
I pasted the code you provided from Thomas directly into the app.open event and it solved the problem. Fantastic.

Also thanks for turning me on to the MBS suite of plugins. I’m going to download and start playing with them.

Gary