On Thu, 2 Jul 2026 14:26:39 GMT, Andy Goryachev <[email protected]> wrote:

>> At one point I distinguished between a `null` value and an empty list. The 
>> `null` value reverted to the old behavior (the built-in application menu) 
>> and an empty list removed the application menu entirely. I got rid of that 
>> distinction at some point; now an empty list and a `null` both cause the 
>> built-in application menu to appear. A call that returns an observable list 
>> would better match how other JavaFX API's work so I'm open to changing over 
>> to that style.
>
> Is a no-menu case a valid one?  I mean, is this something we should be able 
> to do for completeness sake, or it totally makes no sense?

A Mac application should always have an application menu. The no-menu case 
would require a developer to add a copy of the application menu to every 
MenuBar in every window in their application. That doesn't sound useful to me 
but I could be wrong.

Currently if the number of common menus goes to zero for any reason I use the 
default application menu instead. It got complicated trying to make a 
distinction between null, an empty list, and a non-empty list where all the 
menus are hidden.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1881#discussion_r3514337876

Reply via email to