Recent

Author Topic: [SOLVED] Application menu not displaying using Cocoa widgetset  (Read 254 times)

willbprog9933

  • New Member
  • *
  • Posts: 36
    • BrainOut!
Hello everyone,

When I build a test Cocoa app, I click on the test app's application menu item, but no menu displays and I cannot quit from there.  If I build the test app with the Carbon widgetset, I get the application menu and can select 'Quit'.  Is this normal or a bug?

fpc 3.0.4
Lazarus 2.0.0
macOS 10.11.6

Thanks! :)
« Last Edit: August 07, 2019, 07:17:04 am by willbprog9933 »
Blessed and forgiven! :-D

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2267
    • havefunsoft.com
Re: Application menu not displaying using Cocoa widgetset
« Reply #1 on: August 06, 2019, 11:11:09 pm »
this is normal.

Cocoa is more flexible with how you use the application menu.

If you want default items to be available simply place TMainMenu component into the form.

...wait... Lazarus 2.0.0 ??? that might be a bit buggy with menu.
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

willbprog9933

  • New Member
  • *
  • Posts: 36
    • BrainOut!
Re: Application menu not displaying using Cocoa widgetset
« Reply #2 on: August 06, 2019, 11:52:55 pm »
this is normal.

Cocoa is more flexible with how you use the application menu.

If you want default items to be available simply place TMainMenu component into the form.

...wait... Lazarus 2.0.0 ??? that might be a bit buggy with menu.

Thank you skalogryz. 

2.0.0 was the latest version the other day when I downloaded from SF.  I know there have been some updates but I'd rather wait until some of the issues are fixed with them.
Blessed and forgiven! :-D

willbprog9933

  • New Member
  • *
  • Posts: 36
    • BrainOut!
Re: Application menu not displaying using Cocoa widgetset
« Reply #3 on: August 06, 2019, 11:56:35 pm »
hehehe, I think something is not quite right here.  I added the TMainMenu to the form and this happened...

(image shows a small Apple logo next to the 'real' Apple logo, then the application menu)

« Last Edit: August 07, 2019, 12:16:18 am by willbprog9933 »
Blessed and forgiven! :-D

willbprog9933

  • New Member
  • *
  • Posts: 36
    • BrainOut!
Re: Application menu not displaying using Cocoa widgetset
« Reply #4 on: August 07, 2019, 12:03:59 am »
I thought to myself "Maybe I should add a menuitem and this will fix the extra tiny apple item".  I added a new menuitem then tried to edit the caption, and the following happened...

(images show Lazarus crash dialogs)

I guess today is not my day in Lazarus! :P
« Last Edit: August 07, 2019, 12:16:32 am by willbprog9933 »
Blessed and forgiven! :-D

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2267
    • havefunsoft.com
Re: Application menu not displaying using Cocoa widgetset
« Reply #5 on: August 07, 2019, 12:37:01 am »
ok.
Step #1 - get rid of 2.0.0. and use either 2.0.2 or recently released 2.0.4 (if you feel hardcore enough, you can try trunk version too)
Step #2 - repeat TMainMenu component placement
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

willbprog9933

  • New Member
  • *
  • Posts: 36
    • BrainOut!
Re: Application menu not displaying using Cocoa widgetset
« Reply #6 on: August 07, 2019, 12:44:41 am »
ok.
Step #1 - get rid of 2.0.0. and use either 2.0.2 or recently released 2.0.4 (if you feel hardcore enough, you can try trunk version too)
Step #2 - repeat TMainMenu component placement

Thanks for the advice.  I have installed 2.0.4 and none of the problems are happening now.

Thank you! :D
Blessed and forgiven! :-D