Recent

Author Topic: Missing Menu Bar  (Read 2647 times)

jcdammeyer

  • Full Member
  • ***
  • Posts: 213
  • Embedded System Developer
    • Automation Artisans Inc.
Missing Menu Bar
« on: May 05, 2024, 02:03:23 am »
As part of a programming language discussion in a metal working forum I brought up the subject of Lazarus and FP and how nice it is to move between systems and have the same IDE and code work no matter where.

Since I have my late son's MAC PRO 2008 3,1 with El Capitan installed I thought I'd make a point that I could even compile a program that runs on the Debian Raspberry Pi, Beaglebone Black, Windows PC and my Lenovo LinuxCNC PC.

So I downloaded the three install files from the lazarus site and sure enough it installed and ran and I compiled the program.   Screen shot shows version info.

Second screen shot shows the problem.  Where's the menu bar?  There's a window that lets me add items to the menu bar.  I can double click on one of those and I end up in the on click event code. 

As I'm not really a MAC user it's probably really simple?  Why is the menu bar missing?

On the same hardware but with a disk drive that has Debian with the Raspberry Pi User interface there's no problem.   

ecrypt

  • New Member
  • *
  • Posts: 20
Re: Missing Menu Bar
« Reply #1 on: May 05, 2024, 07:45:46 am »
Yes, the case is the same as if running on Kubuntu
-Lazarus 2.2.7 64bit (Kubuntu-.22.04 amd64)
-ZeosDBO-7.xx
-PostgreSQL-14.3, SQLite-3

jcdammeyer

  • Full Member
  • ***
  • Posts: 213
  • Embedded System Developer
    • Automation Artisans Inc.
Re: Missing Menu Bar
« Reply #2 on: May 05, 2024, 08:06:17 am »
So you don't get a menu bar on Kubuntu?

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2032
  • Former Delphi 1-7, 10.2 user
Re: Missing Menu Bar
« Reply #3 on: May 05, 2024, 09:30:48 am »
For macOS, not Linux, the issue is caused by starting the executable binary directly instead of starting the application bundle which contains the exexcutable or a link to it.

You might want to check the FAQ on the Wiki : which covered that issue and several others that may be confounding to a new macOS user.
« Last Edit: May 05, 2024, 09:40:27 am by trev »

jcdammeyer

  • Full Member
  • ***
  • Posts: 213
  • Embedded System Developer
    • Automation Artisans Inc.
Re: Missing Menu Bar
« Reply #4 on: May 05, 2024, 10:11:42 am »
That's stupid.  I click run with debugger and that means I can't see the menu bar while debugging the program? 

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2032
  • Former Delphi 1-7, 10.2 user
Re: Missing Menu Bar
« Reply #5 on: May 05, 2024, 10:18:44 am »
Did you create an application bundle for your program ?

jcdammeyer

  • Full Member
  • ***
  • Posts: 213
  • Embedded System Developer
    • Automation Artisans Inc.
Re: Missing Menu Bar
« Reply #6 on: May 05, 2024, 10:57:16 am »
Not sure.  I have a zip with all the files.  I can open the .ipi file of the project on four different systems: PC; LinuxCNC PC; Raspberry Pi; Beaglebone Black.  In each case the behavior is the same.   On the MAC installation the menu bar doesn't show up.
As Lazarus is a pseudo clone of Delphi none of those systems operate any differently from Delphi other than it can only compile for a target from Windows.

As I see it the problem isn't with what I open but that the Lazarus installation on MAC OS doesn't behave like the other systems.  Which is odd since the Lazarus application itself does have the menu bar.

I'll report back to the metal working group that Lazarus on a Mac is a waste of time.  The idea of write once, compile anywhere is garbage with respect to Apple computers if they run MAC OS.  Absolutely no problem if they run Linux. 

ecrypt

  • New Member
  • *
  • Posts: 20
Re: Missing Menu Bar
« Reply #7 on: May 05, 2024, 12:37:19 pm »
So you don't get a menu bar on Kubuntu?

Yes, in Kubuntu the menu status bar when the design is not displayed, the menu bar will appear when the program is run

I tried several downloads from https://gitlab.com/freepascal.org/lazarus/lazarus
Both versions
1. lazarus-fixes_3_0.zip (3.3)
And
2. lazarus-main.zip (3.99)
-Lazarus 2.2.7 64bit (Kubuntu-.22.04 amd64)
-ZeosDBO-7.xx
-PostgreSQL-14.3, SQLite-3

wp

  • Hero Member
  • *****
  • Posts: 12288
Re: Missing Menu Bar
« Reply #8 on: May 05, 2024, 12:54:43 pm »
Not a Mac expert at all, just running Mojave in a VM for occasional tests: mac OS splits the menu bar off of the application and displays it at the top of the screen. Click into the application to display its menubar at the top of the screen. And in the "System Preferences" > "General" there is an even more confusing option to "automatically hide and show the menu bar" which displays the currently active menu bar only when mouse is moved to the top of the screen. Ubuntu had the same user-unfriendly behaviour as well some time ago, but removed it again after a while.

ecrypt

  • New Member
  • *
  • Posts: 20
Re: Missing Menu Bar
« Reply #9 on: May 05, 2024, 01:29:33 pm »
Both run with LCL widget type QT5
-Lazarus 2.2.7 64bit (Kubuntu-.22.04 amd64)
-ZeosDBO-7.xx
-PostgreSQL-14.3, SQLite-3

jcdammeyer

  • Full Member
  • ***
  • Posts: 213
  • Embedded System Developer
    • Automation Artisans Inc.
Re: Missing Menu Bar
« Reply #10 on: May 05, 2024, 06:59:31 pm »
Not a Mac expert at all, just running Mojave in a VM for occasional tests: mac OS splits the menu bar off of the application and displays it at the top of the screen. Click into the application to display its menubar at the top of the screen. And in the "System Preferences" > "General" there is an even more confusing option to "automatically hide and show the menu bar" which displays the currently active menu bar only when mouse is moved to the top of the screen. Ubuntu had the same user-unfriendly behaviour as well some time ago, but removed it again after a while.
That doesn't work on my MAC.   Run from within Lazarus the menu bar stays as Lazarus.  Run from the folder after Lazarus is closed it first launches terminal which then launches the application and then the terminal menu bar stays at the top of the screen. 
So somehow Lazarus is not doing something that makes the application stand alone. 
I've had that sort of issue with Linux in various flavours too.  There clicking on the executable always first brings up a dialog asking if I want to run this program.  Again not clear how to tell it "always yes".\
I suspect there's something similar but in either case to make an application write once, compile anywhere with similar look and feel that terminal mode to run the application and then no menu bar is just wrong.
So the question is:  How does one tell Lazarus on a MAC to make an application executable without using terminal.  Or for that matter when it's running in debug mode.  As in I want to debug and single step through the code of the second menu, 3rd choice for example when it doesn't even show up as a choice.

jcdammeyer

  • Full Member
  • ***
  • Posts: 213
  • Embedded System Developer
    • Automation Artisans Inc.
Re: Missing Menu Bar
« Reply #11 on: May 05, 2024, 07:01:10 pm »
Both run with LCL widget type QT5
Your screen shots just show the Lazarus development screen.   Not the application running and the menu bar.  Were you able to get the menu bar to show when the app runs?  Both with and without Lazarus running?

jcdammeyer

  • Full Member
  • ***
  • Posts: 213
  • Embedded System Developer
    • Automation Artisans Inc.
Re: Missing Menu Bar
« Reply #12 on: May 05, 2024, 07:01:58 pm »
Did you create an application bundle for your program ?

How do I create an application bundle?

dbannon

  • Hero Member
  • *****
  • Posts: 3011
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Missing Menu Bar
« Reply #13 on: May 06, 2024, 02:11:28 pm »
Project Options, press the "Create Application Bundle" button.

You may need to do some editing once its created.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

jcdammeyer

  • Full Member
  • ***
  • Posts: 213
  • Embedded System Developer
    • Automation Artisans Inc.
Re: Missing Menu Bar
« Reply #14 on: May 06, 2024, 07:11:48 pm »
Project Options, press the "Create Application Bundle" button.

You may need to do some editing once its created.

Davo
Thank you.  That worked.  Interesting that the installation for the MAC doesn't set that ON by default.
John
« Last Edit: May 07, 2024, 08:35:38 pm by jcdammeyer »

 

TinyPortal © 2005-2018