The Menus are triggered on_press and they should be triggered on_release. One method of menu browsing is to click the menu root, have it draw down, browse to the desired menu item, and click again. The other method is to click and hold the pointing-device button on the menu root, browse the menu items, and release on the desired menu item. This method is an older, but still workable, style. However, the functional difference is that if you browse menus while keeping the pointing-device button pressed and release on your selection, then in the current version of AlphaCocoa nothing happens because it activates on_press rather than on_release. Thus you must press the pointing-device button again for the desired action to take effect. If the action was triggered on_release then both methods work equally well.
I must be missing something but both methods seem to work in AlphaCocoa. In the core, the menu item command is executed from the -[mouseUp:] method defined in class AlphaMenuItemView, that is to say onrelease.
Bernard,
I just downloaded the new version 9.0a2. I still get the same problem.
If I hold down the trackpad button and migrate to the command I want (for example I start at the FILE menu, move over to the SEARCH menu and ultimately release the button on the FIND command) when I release the button nothing happens. Then if I click the button anywhere the FIND window appears.
However if I tap or click to draw down a menu and then tap or click to select a menu item, it works fine. So for example, if I tap/click on the FILE menu, move over to the SEARCH menu and then tap/click on the FIND command, the FIND window opens as expected.
Thank you for all of your work.
Steven Penn
Hobart & William Smith Colleges
Physics Dept., Eaton Hall, Rm 126
10 St. Clair Street
Geneva, NY 14456
Related
Tickets:
#10I really do not understand. I did exactly as you describe :
So I clicked on the trackpad to open the FILE menu, maintained the pressure on it while navigating to the SEARCH menu, then -- still maintaining the pressure -- I positionned the arrow over the FIND command, then released and... the Find command was executed, displaying the Find dialog. So it was triggered on release.
Am I missing something ?
I see the same thing Steven does with 9.0a8. Click, navigate, release does nothing. The next click on the menu bar executes.
I don't know if it matters, but because my trackpad died on me, I'm using an old USB Apple Pro Mouse.
I'm puzzled. I'm currently testing this on a MacBook Pro under OS X 10.9.
What can explain this difference ? Is there a system preference which gives control on this ?
OK, at last I see this on El Capitan. I'll look into it.
For what it's worth, I see this on a 2014 MacBook Pro using an external mouse under MacOS 10.10.5 in AlphaCocoa 9.0a10.
I can confirm that under MacOS Sierra, 10.12.3, using the trackpad on a 2016 MBP, I see this behavior with AlphaCocoa 9.0a13.
While I don't recall seeing this during earlier versions of AlphaCocoa (perhaps because I wasn't focused on testing this specific issue), it now certainly exhibits this behavior as well under MacOS Yosemite 10.10.5 (Mac Pro) using both a mouse and a Logitech trackball. Both machines have 16GB RAM, but are otherwise very different architectures.
In both cases, when attempting to select another window from the windows menu, drag-release on the menu item does not activate the window; however, if I subsequently attempt to select a new menu item, the previously chosen window immediately comes to the front upon release of the mouse/trackpad/trackball button.
The same sort of behavior occurs when trying to drag-select almost any item from an AlphaCocoa menu - including Show Find Bar, Compare Windows, Preferences dialogs, etc. Clicking to open the menu root and then clicking on the menu item always works, but drag-select to activate fails until a subsequent menu selection is attempted.
Last edit: Greg Dunn 2017-02-02
At last, this is fixed now. The -[AlphaMenuItemView mouseUp] method in was invoking performSelector for mode NSEventTrackingRunLoopMode. It also has to listen to NSDefaultRunLoopMode mode.
Fill will be in next release (9.0b1).