menubar & statusitem based app.

Ok I will admit up front that it is probably PEBKAC (problem exists between keyboard and chair).

I have an application that exists in the Mac menubar (look to your upper right of the screen). I am using NSStatusItemMBS and the related MBS functions. Works great. But…

I have no menubars defined in the application (deleted the default one). Every window & app itself the menubar = None in the IDE. And based on the docs I have read, this would remove the menubar (where it lists the name of the app in the upper left) & File/Edit/etc. but it hasnt. I have tried putting in app.menubar=NIL, self.menubar=NIL, etc and no what I do, I get the default application menubar.

I have less hair now than I did before I started this application.

Please tell me where I am going wrong.

coding platform: 10.9.5 / 8gig RAM / MBA / Xojo 2014R1.1 (yes I know that I am not current but I have tried 2.1 with same results).

Perhaps related to this thread: https://forum.xojo.com/12532-menubar-item-problem

[quote=139157:@scott boss]Ok I will admit up front that it is probably PEBKAC (problem exists between keyboard and chair).

I have an application that exists in the Mac menubar (look to your upper right of the screen). I am using NSStatusItemMBS and the related MBS functions. Works great. But…

I have no menubars defined in the application (deleted the default one). Every window & app itself the menubar = None in the IDE. And based on the docs I have read, this would remove the menubar (where it lists the name of the app in the upper left) & File/Edit/etc. but it hasnt. I have tried putting in app.menubar=NIL, self.menubar=NIL, etc and no what I do, I get the default application menubar.

I have less hair now than I did before I started this application.

Please tell me where I am going wrong.

coding platform: 10.9.5 / 8gig RAM / MBA / Xojo 2014R1.1 (yes I know that I am not current but I have tried 2.1 with same results).[/quote]

You may want to have a look at the way to remove
https://forum.xojo.com/11024-how-to-start-app-with-no-window-and-without-icon-in-dock

There are many posts about hiding the menu bar on SO :
http://stackoverflow.com/search?q=mac+os+x+hide+menu

Seems the method used is here in MacOSLib :

[code]Function EnterFullScreenModeWithOptions(screen as NSScreen, options as NSDictionary = Nil) As Boolean

#if TargetMacOS then
declare function getEnterFullScreenModeWithOptions lib CocoaLib selector “enterFullScreenMode:withOptions:” (obj_id as Ptr, screen as Ptr, options as Ptr) as Boolean

dim optionsRef as Ptr
if options <> nil then
  optionsRef = options
end if

return getEnterFullScreenModeWithOptions(self, screen, optionsRef)

#else
#pragma Unused screen
#pragma Unused options
#endif
End Function
[/code]

Once you set the correct property list key, the app will no longer show a dock icon or Menubar. Although quite cool is that you can still attach a menubar to the window and use the standard shortcut keys.

LSUIElement = 1

the info.plist is the way to go. There are a few alternative modes with keys there.

And you should keep the menubar in the project.