Lazarus

Programming => Widgetset => Cocoa => Topic started by: MISV on June 23, 2018, 03:57:32 pm

Title: Problem occuring in Cocoa menus
Post by: MISV on June 23, 2018, 03:57:32 pm
When my TMainMenu "View" menu shows/opens (either by clicking it or hovering over all my top menus) I get the follow error in Lazarus/Cocoa/1.9.0/Trunk/20thjune2018

RunError(216) in cocoa/cocoawsmenus.pas line 340

Code: Pascal  [Select]
  1. procedure TCocoaMenuItem.menuNeedsUpdate(AMenu: NSMenu);
  2. begin
  3.   menuItemCallback.ItemSelected;
  4. end;

I am currently researching the problem to see if I can make a formal bug report with a simple test case - but if anyone else can chip in please do :)

The only difference I can tell is that my "View" menu contains a menu item with "Down" set.

Otherwise my other working menus also contains images (not shown though) and submenus and checked
Title: Re: Problem occuring in Cocoa menus
Post by: ChrisR on June 24, 2018, 12:37:17 pm
Does your program work if you rename the "View" menu to have the caption "Display". MacOS automatically appends the menu item "Enter Full Screen" to any menu named "View" (it also adds "Start Dictation" and "Emoji & Symbols" to your Edit menu).
Title: Re: Problem occuring in Cocoa menus
Post by: MISV on June 25, 2018, 11:16:00 am
That seems to solve the issue. Thank you!

I have reported it here:
https://bugs.freepascal.org/view.php?id=33906 (https://bugs.freepascal.org/view.php?id=33906)


Another menu bug
If you have a menu called "help" macOS adds a search box. Typing anything into it makes software crash.

I have reported it here:
https://bugs.freepascal.org/view.php?id=33907 (https://bugs.freepascal.org/view.php?id=33907)